none
ASP.NET Project Start Action Start Page Restrictions RRS feed

  • Question

  • I have an older ASP.NET website and webservice project in which the website is being upgraded. The issue is I want to revert to a index.html as the start page. Even if I set the project's properties to do so, the index.aspx remains as the startup page. If I exclude the index.asox file from the project, the website reports "You do not have permission to view this directory or page." Is there something else that needs to be enabled or changed? 
    Sunday, November 17, 2019 2:23 AM

Answers

  •  In Web.config, modify the defaultDocument parameter:  

      <system.webServer>
        <staticContent>
          <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
        </staticContent>
        <defaultDocument>
          <files>
            <clear />
            <!--<add value="index.aspx" />-->
            <add value="index.html" />
          </files>
        </defaultDocument>


    • Edited by AlaskanRogue Sunday, November 17, 2019 3:30 PM
    • Marked as answer by AlaskanRogue Sunday, November 17, 2019 3:31 PM
    Sunday, November 17, 2019 3:30 PM

All replies

  • One interesting factor is the index.html file is accessible and functions property if called as just a project file in the website; permissions not restricted.
    Sunday, November 17, 2019 10:50 AM
  •  In Web.config, modify the defaultDocument parameter:  

      <system.webServer>
        <staticContent>
          <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
        </staticContent>
        <defaultDocument>
          <files>
            <clear />
            <!--<add value="index.aspx" />-->
            <add value="index.html" />
          </files>
        </defaultDocument>


    • Edited by AlaskanRogue Sunday, November 17, 2019 3:30 PM
    • Marked as answer by AlaskanRogue Sunday, November 17, 2019 3:31 PM
    Sunday, November 17, 2019 3:30 PM
  • Hi AlaskanRogue,

    We are very glad to hear that your issue has been solved and we appreciate that you could share solutions with us and other members who have similar issue could refer to this thread.

    BTW, if you have any other questions about Visual Studio General Questions in the future, please feel free to contact us.

    Have a nice day : )

    Best Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 18, 2019 3:07 AM