Set Default Web Page

This can be accomplished by using the Configuration Editor pane in IIS Manager.

  • First of all highlight the Site in the Explorer e.g. SiteA and click Configuration Editor.

 

 

  • Now select the system.webServer/defaultDocument from the Section drop down and ApplicationHost.config in the From drop down e.g.

 

  • To create the setting for the default page, click the ellipsis in the files row of the configuration editor table (outlined in red in the above screenshot). The Collection Editor will appear.

  • Here we need to click Add. You can now enter a new value in the Properties grid (see area outlined in red above). This value should be the value for the default page for the Site e.g. mySiteA.aspx. Now close this window.

 

  • It’s important to click the Apply Action when back on the Configuration Editor window - see area outlined in red in the above screenshot.
  • Once Apply has been clicked, the default page should then be set.
  • Repeat as necessary for the number of default web pages that need to be set.

Using the AppCmd Utility

The above can also be achieved by using the ‘AppCmd’ utility e.g.

AppCmd
appcmd.exe set config "SiteA" -section:system.webServer/defaultDocument /+"files.[value='mySiteA.aspx']" /commit:apphost

This will set the default web page for SiteA.

Or the following example shows this at individual application level:

AppCmd
appcmd.exe set config "Default Web Site/Oxford.iShareMaps.Web" -section:system.webServer/defaultDocument /+"files.[value='MyOxford.aspx']" /commit:apphost