如何在IIS 10在Windows 10上运行ASP.NET MVC应用程序 [英] How to run ASP.NET MVC app in IIS 10 on Windows 10
问题描述
我通过Windows功能安装IIS 10出版MVC应用程序到IIS文件夹,然后执行DISM /在线/启用,功能/ 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
我在为aspnet_regiis -I命令,而不是Windows 7做了这个DISM /在线/启用,功能/ featurename:IIS-ASPNET45和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.
推荐答案
我有类似的问题 - 在我的情况下,IIS只是还没有充分的权限访问文件夹,我把网站文件...
I had similar problem - in my case IIS just have not full rights to access folder where I put website files...
充分访问目录通过Windows属性/安全解决的问题在我的情况。
Giving full access to directory via Windows Properties/Security resolved problem in my case.
试试把你的网站文件 C:\\的Inetpub
- 我的经验这是最好的位置(但应该没有什么区别)
Try put your website files to C:\inetpub
- form my experience it's the best location (but should make no difference).
其他的事情:
- 检查如果IIS有权 C:\\的Inetpub
&安培; .. \\文档\\ IISEx preSS
- 检查你是否已经安装了正确的版本OD .NET和ASP.NET
Other things:
- check if IIs have rights to C:\inetpub
& ..\Documents\IISExpress
- check if you have installed right version od .NET and ASP.NET
我看到你尝试安装ASP.NET 4.5,但是针对你的项目?
I see that you try install ASP.NET 4.5, but what targeting your project?
如果您尝试部署新的项目,你可能需要APS.NET 4.6或ASP.NET 5 RC(在第二种情况下,你还需要安装DNX)。
If you trying deploy new project you probably need APS.NET 4.6 or ASP.NET 5 RC (in second case you need also setup DNX).
这篇关于如何在IIS 10在Windows 10上运行ASP.NET MVC应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!