Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Say I have a Wordpress site that is hosted on a linux box and I want to add an entirely new piece of functionality using asp.net.

Would it be possible to host the new asp.net portion of the site on a windows server and still provide a seamless user experience? Is this a good idea? What problems could I expect to have if I have had a server setup like this?

share|improve this question

4 Answers 4

I agree with Joyce in that there are multiple ways you could go about this. IIS7 does in fact support PHP and, for the most part, it works fairly well. With the WordPress site running in IIS, it is pretty straight forward to create a virtual directory (IIS application) to run your ASP.Net application on the same domain as your main site (ex. http://mydomain.com/ASPdotNetApp/).

If you want to keep WordPress running on your Linux server, then there are a couple of options that are probably the most common. The first would be to run your ASP.Net application on a separate Windows server as a subdomain. So your main site would still be http://mydomain.com and the new application would be http://aspnetapp.mydomain.com.

The other common option for running the ASP.Net application on a different server would be to use a reverse proxy. This was alluded to in a couple of the answers given so far but I don't think it was explicitly stated. To do this, you would run your ASP.Net application on a different server and then setup mod_proxy on your Linux server (specifically, by using the ProxyPass directive).

Information on mod_proxy can be found here and information on ProxyPass can be found on that page here.

With the reverse proxy in place, if you were to direct users to http://mydomain.com/AspdotNetApp/, they would not be aware that the application was running on a different server.

share|improve this answer

You can simply setup a sub domain name and find a ASP.NET hosting company to host that. It'll seamless to the users and that's probably the best way to do so. You can also check out www.smarterasp.net for great pricing and reliability on their asp.net hosting plan. That's the company I've been using for few years.

share|improve this answer

There are several solutions.

  1. You could get a IIS server with PHP support
    Not sure if Wordpress supports it

  2. You get get an Apache server with mod_mono (open source implementation of ASP)
    *Not sure whether mod_mono supports latest ASP.net features*

  3. You can host the asp section on a sub domain and point the subdomain to the new server. Easiest solution. You could use the same design for both the main domain and subdomain and no one will notice the difference.

  4. Or you could setup a server side proxy to intercept the requests and reroute the request to the appropriate server.

share|improve this answer
    
Wordpress should work in IIS7+. It's part of the Microsoft Web Matrix. microsoft.com/web/webmatrix –  Randy E Sep 5 '12 at 12:11

This happens all the time and depends what you are trying to do, separating load over two servers like this could in theory improve user experience if your current server is on a high load. It is quite common to use, for example, CURL (http://curl.haxx.se/) to access functionality on another server and the effect on the user experience would very much depend on the other server, its load etc.

My personal experience is that it accessing api's etc usually slows things down a bit particularly if the second server is accessed server side as you are essentially creating a three way transport of data, where user contacts server 1, server one contacts server 2, server2 does something and then gets back to server 1 with a response, which then has to serve that response back to the user, far better if the functionality can be accessed using an ajax call so that the users browser can contact server 2 directly.

Hope this helps

share|improve this answer
    
So would it be possible to have myUrl.com go to one server and myUrl.com/AppDirectory go to another? The two servers would never be talking to each other. Basically I would be hosting two separate websites on two different servers and together they would make the complete website... –  Abe Miessler Aug 27 '12 at 18:53
    
If you want to keep the url the same it would have to be done in the server software (eg apache/IIS), I have a shared hosting provider who provide this functionality from within cpanel, I dont think you can do this from php, but you could probably achieve this from a .htaccess file if you have mod-rewrite enabled on your server. –  WebweaverD Aug 27 '12 at 19:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.