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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have manually set the default document inside of IIS 7 on multiple web sites but cannot get them to remain set after a promotion of code. Virtual Directories are fine. I know we can specify the default doc in the web.config but I'd like to simply continue to set it in IIS 7. Anyone else having this issue. I'm sure its a fairly simple answer but I'm fresh off working in IIS6 where you set it once and you're good.

share|improve this question

William,

Are you setting this globally or individually through each site? From the site root level, clicking on default document and then add default document.

It might also be a matter of scheduling time to restart IIS after having made these changes? I am not sure if these changes are written to disk until after IIS is reset.

There is also a way through PowerShell

Add-WebConfiguration //defaultDocument/files "IIS:\sites\WEB1\servertest" -atIndex 0 -Value @{value="servertest.aspx"}

share|improve this answer
    
Thank you Nicholas! I've been setting the document at the root site level but have not tried an IISReset. When I set it at the site root level it prompts to revert to parent. I've not tested reverting because I just built the farm and didn't want to bring anything down until I had a bit of experience with it. I appreciate your help very much. – user57293 Oct 18 '10 at 14:36

Your Answer

 
discard

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