Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

migrated from Jan 5 '11 at 16:32

This question came from our site for pro webmasters.

2 Answers 2

up vote 2 down vote accepted

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 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.

share|improve this answer

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.

share|improve this answer

Your Answer


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.