1

I have two different domain names that resolve to the same ASP.Net site. Both domains are hosted on the same server, which runs Windows Server 2003 and IIS6. The sites are differentiated in IIS Manager using host headers. However, both of the sites point to the same folder on the local drive for the site's page files.

I am occasionally experiencing an ASP.Net error that says "The state information is invalid for this page and might be corrupted." I'm the site developer so I've addressed all the relevant code-related causes for this issue. However, I was wondering whether having two domains/sites sharing the same folder for an ASP.Net application might be causing this intermittent error. Also, is this generally a bad practice? Should I make separate, duplicate folders for each of the domains? Seems like that can become a maintenance headache.

2 Answers 2

2

if you must use the same folder for multiple sites, then the correct approach is: 1. Setup all the sites to run under one folder 2. Setup IIS to see them all as one site 3. Configure the IIS site with all the hostnames 4. Have your ASP.net Page show different content based on the URL.

Might be a lot cleaner to divide it up between multiple sites. Depending on your scnenario you might be in your situtation because you require wirting of files from one site, and reading from another. In that case i find its best to have an uploads directory with Iuser permissions to write to and read from as a virtual directory.

1

You should be fine running them from the same folder, I've done that before without issues in IIS. I'm not sure if it's "bad practice" or not but it works.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .