我刚刚在 Visual Studio 2012 中创建了一个新的空网站,然后单击“运行”(即在浏览器中查看),然后收到此错误:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
我进入 IIS 并单击目录浏览,然后确保目录浏览已启用,但我仍然收到此错误。我看不懂?
我刚刚创建的网站项目没有列在 IIS 管理器的默认网站中,我认为这很奇怪。
如何消除这个错误?
最佳答案
将其保留到您的 Web 配置文件中,然后重命名 add value="yourwebformname.aspx"
<system.webServer>
<defaultDocument>
<files>
<add value="insertion.aspx" />
</files>
</defaultDocument>
<directoryBrowse enabled="false" />
</system.webServer>
其他
<system.webServer>
<directoryBrowse enabled="true" />
</system.webServer>
关于asp.net - HTTP 错误 403.14 - 禁止 - Web 服务器配置为不列出此目录的内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18981118/