Addig new Default Document to IIS 7

2.9k views Asked by At

I'm trying to add a Default Document to my IIS 7 website, and when I go to add it in the Entry Type column it says Local instead of Inherited? How do I make it Inherited? When I close out of it and go back to it, the file I just added is gone. Here are the steps that I go about doing it.

1. Left click on site name in the pane
2. Double click on the Default Document icon
3. Click the Add button in the upper right
4. Type in the name of the file 
5. Hit Ok

Then it shows up like this:

enter image description here

1

There are 1 answers

0
lat3ncy On BEST ANSWER

In IIS Manager change to the web server level config by selecting your machine name on the left. You will then be adding the default document to the applicationhost.config which is inherited by each site.

alternately use appcmd, e.g.: appcmd.exe set config "MySite" -section:system.webServer/defaultDocument /+"files.[value='FileName.ext']" /commit:apphost