The Web server is configured to not list the contents of this directory.

部署一个ASP.NET MVC网站至一个全新的服务器Windows Server 2008 R2, 数据为MS SQL Server 2014 64bit Expression版本。

运行时,它第一次显示出来是一个异常:

The Web server is configured to not list the contents of this directory.

The Web server is configured to not list the contents of this directory._第1张图片

 
解决方法:
打开站点根目录下的Web.config,添加下面节点信息:

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>

 

你可能感兴趣的:(The Web server is configured to not list the contents of this directory.)