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.
![](https://images2015.cnblogs.com/blog/28036/201604/28036-20160424135338382-1670366426.png)
解决方法:
打开站点根目录下的Web.config,添加下面节点信息:
<system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer>