【发布时间】:2015-03-07 17:35:00
【问题描述】:
我已按照本主题的所有说明进行操作,但仍然无法正常工作。 How to configure an MVC6 app to work on IIS?
如果我在 IIS 中启用目录浏览,我可以看到来自 wwwroot 的所有文件。如果我禁用它,我会收到此错误:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
【问题讨论】:
-
你的默认页面设置了吗?
-
什么默认页面?我在 ASP MVC 中没有页面。这是我在 IIS 中的默认文档设置:s21.postimg.org/vdb7ixinb/Untitled.png
-
我希望你从你的发布目录中映射 wwwroot。还要确保您的 web.config 文件存在于 wwwroot 中。
-
请提供您在 IIS 中的文件夹结构的屏幕截图。
-
是的,我映射了 wwwroot 文件夹。这是一个包含文件夹结构和 IIS 设置的屏幕截图。 s23.postimg.org/r3b425q0r/Untitled.png
标签: iis asp.net-core visual-studio-2015 asp.net-core-mvc