views:

313

answers:

3

Hi,

A quick ASP.Net performance question...

I have an ASP.Net 3.5 SP1 Application that I want to run on IIS 6. For SSL certificate reasons I need to run it on separate sites in IIS. It's a CMS, and some clients will need the add their own SSL certs.

1) Can I run the same set of ASP.Net files on the disk on multiple sites in IIS or do I need to mirror them?

2) What considerations do I need to make in terms of performance, e.g. having multiple database connections from each site?? Or will they be 'pooled'?! Also, I am using Linq to SQL and am caching the results using ASP.Net's cache. Will it be an overhead to have separate caches for each IIS site of essentially the same data? Are there any other performance or application design considerations for this scenario?

3) Does running the IIS sites under the same App Pool make any difference?

Or does anyone have a totally different recommendations?

Any guidance you can give would be much appreciated. I'm looking for as many varied opinions and experiences as possible here, so please do add an answer if you can help.

Cheers, Tim

+1  A: 

Maintenance will be WAY easier if you only have one IIS site to manage. A more efficient way would be to deal with the SSL issue somewhere else (eg, hardware load balancer, content switch, Apache box, etc) and reverse-proxy to a single IIS instance with a single version of the app running. Sharing the app pools won't help (assuming you're using SQL Server with the managed client anyway), because each web app gets its own Appdomain and hence its own connection pool. Sharing app pools causes them to share a process, but not an appdomain.

I've done this on the cheap before by having Apache installed on the same machine as IIS, listening only on port 443 (for however many IP/cert combos were needed), then have Apache set up as a reverse proxy to IIS on the same machine listening only on port 80 (but for any host header).

nitzmahone
A: 

I agree it does not make sense to run different web sites for the same applicaiton.

You can set SSL port in the web site with IIS manager. If you do not set IIS to require certificates, some users can use the HTTP version without the certificate error and the others can use SSL.

Andrei Drynov
A: 

I wrote a blog up on the topic of multiple websites, same set of files for .net. I think it directly relates to what you are discussing, so check it out at:

http://jasonjano.wordpress.com/2010/02/22/multi-presentation-websites-for-c/

Jason