IIS and asp.net appcmd

10,221

You need to enable directory listings and/or add a default document (default.aspx, default.htm...) to the root of the site.

For more information about directory listing: Enable directory listing

Share:
10,221

Related videos on Youtube

Yabooo Yakhoo
Author by

Yabooo Yakhoo

Updated on June 04, 2022

Comments

  • Yabooo Yakhoo
    Yabooo Yakhoo almost 2 years
    HTTP Error 403.14 - Forbidden
    The Web server is configured to not list the contents of this directory.
    Most likely causes:
    
        A default document is not configured for the requested URL, and directory browsing is not enabled on the server.
    
    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 configuration/system.webServer/directoryBrowse@enabled attribute is set to true in the site or application configuration file.
    

    I have the above error when I try to run my first application with VS12. Have you any idea of what is going wrong and how can I fix it ? In VS10 I guess I don't have this sort of error message

    • Mike Atlas
      Mike Atlas over 11 years
      Did you try the Things you can try from the error message?
    • Yabooo Yakhoo
      Yabooo Yakhoo over 11 years
      Yes, I did but it still didn't work
    • Lex Li
      Lex Li over 11 years
      This single piece of information is useless. Are you doing ASP.NET MVC development? It seems that routing does not work, msdn.microsoft.com/en-us/library/cc668201.aspx
    • Yabooo Yakhoo
      Yabooo Yakhoo over 11 years
      Thanks, no I am executing a simple webpage only and my IIS is just freshly set up. I have added <system.webServer> <directoryBrowse enabled="true"/> </system.webServer> into web.config file, and I can visit http://localhost:63420/ which only offers a list of all files in a site I created using inetmgr. Visiting each of the files in there is still infeasible, and displaying that sort of directory browsable is also not what I am looking into, I am testing a simple masterpage :-D
    • Yabooo Yakhoo
      Yabooo Yakhoo over 11 years
      Sure enough, if I set the directoryBrowse attribute option to false, I again run into the same error message. {bored!} By the way, This error doesn't display in Webmatrix2, (it works really fine with WM2). And IO am installing VS10 to see if the same error occurs. I hope not. 80% sure it will work with vs10 because my home machine never reports this kind of error at all. I am using Windows 7 Ultimate SP1.
  • Yabooo Yakhoo
    Yabooo Yakhoo over 11 years
    Thank you for your reply, I have followed and did what you suggested but i still run into the same error message