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.

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

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
原文地址:https://www.cnblogs.com/insus/p/5426914.html