HTTP 错误 403.14 - 禁止 ASP.NET Web 应用程序的调试

nik*_*rio 2 .net c# asp.net iis-manager http-error

我正在尝试启动 ASP.NET Web 应用程序

但是我在调​​试时遇到了这个错误:

HTTP Error 403.14 - Forbidden The Web server is configured to not list
the contents of this directory.

Module
   DirectoryListingModule
Notification
   ExecuteRequestHandler
Handler
   StaticFile
Error Code
   0x00000000
Run Code Online (Sandbox Code Playgroud)

不确定这是否正是我必须做的,但正如它所示,我必须遵循此说明,但是当我尝试在 Windows 10 上打开IIS 管理器时,它说 Windows 找不到“inetmgr”。或“inetmgr”。可执行程序'

所以不确定我必须做什么才能弄清楚这个错误。

sec*_*wep 5

由于您似乎没有安装完整的 IIS,请尝试将其添加到您要浏览的目录中的 web.config 中:

<system.webServer>
    <directoryBrowse enabled="true"/>
</system.webServer>
Run Code Online (Sandbox Code Playgroud)

...至少这样你就可以解决这个问题。如果您这样做是为了调试,那很好,但是您必须认真考虑这是否真的是您想要在生产服务器上允许的。