如何在 Windows 10 上的 IIS 10 中运行 ASP.NET MVC 应用程序

3

本文介绍了如何在 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 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

C# 编译错误:“在创建窗口句柄之前,不能对控件调用 Invoke 或 BeginInvoke."
C# compile error: quot;Invoke or BeginInvoke cannot be called on a control until the window handle has been created.quot;(C# 编译错误:“在创建窗口句柄之前,不能对控件调用 Invoke 或 BeginInvoke.)...
2023-11-11 C#/.NET开发问题
2

如何将我的应用程序添加到 Windows Vista/7 的默认程序列表中?
How do I add my application in the Default Programs list of Windows Vista/7?(如何将我的应用程序添加到 Windows Vista/7 的默认程序列表中?)...
2023-11-11 C#/.NET开发问题
9

FileSystemWatcher 和 Windows 7
FileSystemWatcher and windows 7(FileSystemWatcher 和 Windows 7)...
2023-11-11 C#/.NET开发问题
4

ClickOnce 应用程序不通过 Process.Start(“x.abc") 启动,其中 *.abc 与
ClickOnce application does not start through Process.Start(quot;x.abcquot;) with *.abc associated to the ClickOnce application(ClickOnce 应用程序不通过 Process.Start(“x.abc) 启动,其中 *.abc 与 ClickOnce 应用程序关联) - IT屋-程序员软件开发...
2023-11-11 C#/.NET开发问题
3

如何检测由于 Windows 7 幻灯片放映而导致的墙纸变化?
How can I detect wallpaper changing as a result of the Windows 7 slideshow?(如何检测由于 Windows 7 幻灯片放映而导致的墙纸变化?)...
2023-11-11 C#/.NET开发问题
2

更改打印机默认纸张大小
Change printer default paper size(更改打印机默认纸张大小)...
2023-11-11 C#/.NET开发问题
8