Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
Things you can try:

    If you do not want to enable directory browsing, ensure that a default document is configured and that the file exists.
    Enable directory browsing.
        Go to the IIS Express install directory.
        Run appcmd set config /section:system.webServer/directoryBrowse /enabled:true to enable directory browsing at the server level.
        Run appcmd set config ["SITE_NAME"] /section:system.webServer/directoryBrowse /enabled:true to enable directory browsing at the site level.
    Verify that the config
Posted

1 solution

The error tells you what you can try so what exactly is your question?

All this error means is that there is no default document. For example, when you type in www.codeproject.com notice you haven't specified a webpage. But because they have a default document setup, it is actually loading the default document.

So, open IIS and find the Default Document link, open it and type in whatever your default document is. In ASP.Net it's common to have one named default.aspx.
 
Share this answer
 
Comments
Răzvan Muntea 9-May-20 5:49am    
what about in MVC that have a route defined for the default page?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900