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

前端 未结 12 868
时光说笑
时光说笑 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:23

    I faced the same error posted by OP while trying to debug my ASP.NET website using IIS Express server. IIS Express is used by Visual Studio to run the website when we press F5.

    Open solution explorer in Visual Studio -> Expand the web application project node (StudentInfo in my case) -> Right click on the web page which you want to get loaded when your website starts(StudentPortal.aspx in my case) -> Select Set as Start Page option from the context menu as shown below. It started to work from the next run.

    Root cause: I concluded that the start page which is the default document for the website wasn't set correctly or had got messed up somehow during development.

提交回复
热议问题