web analytics

How to change default pages in IIS and ASP.NET?

Options

codeling 1602 - 6666
@2015-12-19 11:46:24

Change default page setting in IIS

Open Administraive Tools windows and select Internet Information Service (IIS) Manager, this will open the IIS management console.

Select your website from the list. Click on Default Document:

Modify the settings by deleting, adding, moving files to meet your requirements.

 

 

@2015-12-19 12:01:43

Setting default pages in the Web.config file

You can also change default pages for your ASP.NET web application by adding the <defaultDocument> element in the web.config file:

 <system.webServer>
        <defaultDocument>
            <files>
                <clear />
                <add value="default.aspx" />
                <add value="Maintenance.html" />
            </files>
        </defaultDocument>
  </system.webServer>

After deployment, you will see the same result in the IIS management console.

Comments

You must Sign In to comment on this topic.


© 2024 Digcode.com