3

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
  • 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.config Commented Dec 20, 2014 at 3:44

1 Answer 1

1
<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

Sign up to request clarification or add additional context in comments.

2 Comments

I have already done that prior to posting my question, but thanks for responding.
Did you set in iis as index.html your default page?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.