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

后端 未结 5 467
终归单人心
终归单人心 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:59

    your root directory is empty?(index.html,index.aspx vb.) and I think Your project web.config default document property is not set.

    Directory Browse Web.config properties

        
    
      
       
        
       
    
      
    
    

    Please configure to your project default route settings, because your default route settings, is not redirect to controller.

    Change Default route settings

    http://blogs.msdn.com/b/prakasht/archive/2013/08/08/change-the-default-route-in-asp-net-mvc.aspx

    Default Document Property web.config

    
       
        
            
                
            
        
       
    
    

提交回复
热议问题