In IIS, is it better to host multiple applications as independent web sites or as virtual directories in the default site?

I have always tried to stick to individual sites for applications. You get much more control over everything and if you're running ASP.NET you don't run into web.config cascading issues that are easy to hit. Plus you have finer grained control over application pools and actually being able to watch the performance of each individual application. This is all preference.

Regardless, probably the best answer is that you apply bindings at the website level and NOT the application level. So if each app needs its own URL or SSL as opposed to non-SSL you really do have to look at individual sites.

Plus as you mention you almost have to program with the deployment mechanism in mind. As any use of relative URLs breaks lots of stuff.

Lastly: why don't they want to use sub-domains? It provides nice clean RESTfulish separation of resources if you ask me.


I'd say it depends... Are the applications very similar to one another in that you could be comfortable making a single change at the higher level that would cascade down to each virtual directory that would not impact the functionality of any single app? If you have a separate site for each app then you will need to separately manage each site's settings (Certs, IPs, ports, etc), which could be a headache if there are a lot of them, but they are totally independent sites so a setting would not affect another app. The real work is done by the worker process/App Pool so in either setup you could share the same app pool for multiple apps or have a separate one for each app.

  • Applications on separate sites = much more granular control over the app and how to connect to it at the cost of more maintenance for each site
  • Applications on same site = easier to manage if they are all very similar, but you could run into configuration issues if the apps have conflicting requirements