How to run ASP.NET MVC app in IIS 10 on Windows 10(如何在 Windows 10 上的 IIS 10 中运行 ASP.NET MVC 应用程序)
问题描述
我通过 windows 功能安装了 IIS 10 并将 MVC 应用程序发布到 IIS 文件夹中,然后执行dism/online/enable-feature/featurename:IIS-ASPNET45"命令但仍然出现错误:
I installed IIS 10 through windows features and published MVC app into the IIS folder, then executed "dism /online /enable-feature /featurename:IIS-ASPNET45" command but still getting error:
HTTP 错误 403.14 - 禁止Web 服务器配置为不列出该目录的内容
HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory
我在 Windows 7 中使用aspnet_regiis -I"命令而不是dism/online/enable-feature/featurename:IIS-ASPNET45"完成了此操作,并且从 localhost 加载了 Web 应用程序,但我似乎无法让它在 Windows 10 上运行.
I've done this in windows 7 with "aspnet_regiis -I" command instead of "dism /online /enable-feature /featurename:IIS-ASPNET45" and web app loaded just fine from localhost, but I can't seem to get this to work on Windows 10.
推荐答案
我遇到了同样的问题,我通过使用 Win10 GUI 选择已安装的功能解决了这个问题.Internet 信息服务 ->万维网服务 ->应用程序开发功能->ASP.NET 4.6
未选中.与我需要的其他几个一起检查了,一切都很好.
I had the same problem and I solved it by using the Win10 GUI for selecting installed features. Internet Information Services -> World Wide Web Service -> Application Development Features->ASP.NET 4.6
was not checked. Checked that along with a few others I needed and all was good.
这篇关于如何在 Windows 10 上的 IIS 10 中运行 ASP.NET MVC 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 Windows 10 上的 IIS 10 中运行 ASP.NET MVC 应用程序


- WebMatrix WebSecurity PasswordSalt 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- 输入按键事件处理程序 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04