A default document is not configured for the requested URL, and directory browsing is not enabled on the server

前端 未结 12 889
时光说笑
时光说笑 2020-12-13 03:37

I have just deployed my asp.net mvc-2 website to a server (using dotnetpanel). But getting this error

A default document is not configured for the requested          


        
12条回答
  •  鱼传尺愫
    2020-12-13 04:30

    Following applies to IIS 7

    The error is trying to tell you that one of two things is not working properly:

    • There is no default page (e.g., index.html, default.aspx) for your site. This could mean that the Default Document "feature" is entirely disabled, or just misconfigured.
    • Directory browsing isn't enabled. That is, if you're not serving a default page for your site, maybe you intend to let users navigate the directory contents of your site via http (like a remote "windows explorer").

    See the following link for instructions on how to diagnose and fix the above issues.

    http://support.microsoft.com/kb/942062/en-us

    If neither of these issues is the problem, another thing to check is to make sure that the application pool configured for your website (under IIS Manager, select your website, and click "Basic Settings" on the far right) is configured with the same .Net framework version (in IIS Manager, under "Application Pools") as the targetFramework configured in your web.config, e.g.:

    
      
        
        
      
    

    I'm not sure why this would generate such a seemingly unrelated error message, but it did for me.

提交回复
热议问题