ASP.NET MVC5 The webserver is not configured for the requested URL, and directory browsing is not enabled on the server

后端 未结 5 464
终归单人心
终归单人心 2021-01-05 16:46

I have an issue with loading the pages from a MVC5 application.

I have this software installed and used:

  • Windows 10
  • Visual Studio Enterpris
5条回答
  •  北海茫月
    2021-01-05 16:54

    Here's what resolved my specific problem:

    From Visual Studio, right click on the Website Project > Properties > Web > Select "Specific Page" > Browse > Select the Default page.

    If you're using MVC 5 or higher, make sure that you remove move ".cshtml" and remove the Views directory. For example, the directory will show as Views/ControllerName/Index.cshtml. Remove Views so it shows as ControllerName/Index

提交回复
热议问题