ASP.NET Core deployed on IIS gives error: HTTP Error 403.14 - Forbidden

ASP.NET Core deployed on IIS gives error: HTTP Error 403.14 - Forbidden

我在网上浏览了几篇与此错误相关的帖子,但其中大部分帖子与经典 ASP.NET 相关,而一些与 ASP.NET 核心相关的帖子也无济于事。

我在 VS2017 上完全按照 official ASP.NET tutorial. Deployed the app on the IIS on same local machine (Win 7.0 64bit) using this official ASP.NET tutorial 创建了一个 ASP.NET Core 应用程序。但是当我在 IIS 中浏览应用程序时,我得到以下 error:

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

注意:该应用程序在 VS2017 中运行良好,并且有问题的 IIS 与 VS2017 在同一台机器上。我已经验证路径是正确的。以上教程中的IIS部署要求全部满足

我建议验证您的 IIS 是否指向正确的文件夹。

将其指向不正确的文件夹可以解释您所看到的内容。