How to run ASP.NET MVC app in IIS 10 on Windows 10

老子叫甜甜 提交于 2019-12-30 17:21:56

问题


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 Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory

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.


回答1:


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.




回答2:


I had similar problem - in my case IIS just have not full rights to access folder where I put website files...

Giving full access to directory via Windows Properties/Security resolved problem in my case.

Try put your website files to C:\inetpub - form my experience it's the best location (but should make no difference).

Other things: - check if IIs have rights to C:\inetpub & ..\Documents\IISExpress - check if you have installed right version od .NET and ASP.NET

I see that you try install ASP.NET 4.5, but what targeting your project?

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).



来源:https://stackoverflow.com/questions/31756420/how-to-run-asp-net-mvc-app-in-iis-10-on-windows-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!