I have an ASP.NET web site project, which I'm publishing to IIS on my Win2k8 R2 server. It has a default page called login.aspx
. I set that up on the published web site.
Trouble is, every time I publish a new version of the web site, the login.aspx
entry gets erased from the "Default Document" settings of the web site in IIS. This is very annoying. How can I publish my web site from Visual Studio without wiping out the default page every time?
Right-click the Web site, virtual folder, or folder whose default document settings you want to configure, and then click Properties. Click the Documents tab. Click to select the Enable Default Document check box. This turns on default document handling for the Web site, virtual folder, or folder that you selected.
Try putting a defaultDocument in your site's web.config:
<system.webServer>
<!-- your other stuff -->
<defaultDocument enabled="true">
<files>
<clear/>
<add value="login.aspx"/>
</files>
</defaultDocument>
</system.webServer>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With