Running a .NET 4.6 MVC application on IIS 8.5 (Windows Server 2012)

∥☆過路亽.° 提交于 2019-12-11 08:57:58

问题


I have an MVC Web API 2 application that I am running quite successfully locally within Visual Studio 2015 RC. I have also successfully published this application to an IIS 8.5 instance running on Windows Server 2012. I have installed .NET Framework 4.6 on this machine also.

The behaviour that I am getting when I try to navigate to the root of the site (http://localhost:81) is that I get a directory listing of the files in the root folder. Clearly I was expecting the routing config of the application to kick in an execute the home controller, but this is not happening.

I am a developer and it has been some time since I configured IIS, but I do remember that I had to do some fiddling with IIS (6?) to get the routing to work.

What am I missing?


回答1:


Make sure your application pool is running in integrated mode and not classic.



来源:https://stackoverflow.com/questions/31113482/running-a-net-4-6-mvc-application-on-iis-8-5-windows-server-2012

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