2
votes

I am trying to set the index.html page as my default page and want it to show up when my asp.net website loads. I've already read a dozen different posts on this issue and none of the solutions worked.

I added the defaultDocument element in web.config and set index.html as the default page in iis. I even created an empty Default.aspx page, added a Global.asax file,and then redirect to index.html using server.transfer.

None of what I've tried worked, when my site loads it redirects to the login.aspx page instead of the index.html page. I tried to get my hosting company techsupport to help but none of them are well versed in dotnet or windows hosting for that matter. Please help me find a way to solve this, thanks.

1
If you're using forms authentication probably that file is not available for anonymous users so you need to make it public on web.configClaudio Redi

1 Answers

1
votes
<location path="index.html">
      <system.web>
         <authorization>
            <allow users="*"/>
         </authorization>
      </system.web>
   </location>

Put above code in web.config file.

It seems that you have configured authentication so it redirect to login.aspx page. Above code allow user to see index.html without authentication.

http://msdn.microsoft.com/en-us/library/b6x6shw7%28v=vs.85%29.aspx