Pages

Saturday, 20 June 2015

Code to set default startup page in web.config

Introduction:

When someone opens your website by entering your domain name in the web browser then by default it will show the startup page. If you haven't setup an startup page than it will look for Default.aspx or index.html page in the source files. You can setup your startup page in web.config file.

Code:

  <system.webServer>
    <directoryBrowse enabled="false"/>
    <defaultDocument>
      <files>
        <clear/>
        <add value="Default.aspx"/>
      </files>
    </defaultDocument>
  </system.webServer>

No comments:

Post a Comment