在IIS 8.5上运行.NET 4.6 MVC应用程序(Windows Server 2012) [英] Running a .NET 4.6 MVC application on IIS 8.5 (Windows Server 2012)

查看:804
本文介绍了在IIS 8.5上运行.NET 4.6 MVC应用程序(Windows Server 2012)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MVC Web API 2应用程序,我在Visual Studio 2015 RC中本地运行非常成功。我还成功将此应用程序发布到在Windows Server 2012上运行的IIS 8.5实例。我也在此计算机上安装了.NET Framework 4.6。

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.

我的行为当我尝试导航到网站的根目录( http:// localhost:81 )时,我得到一个目录根文件夹中的文件列表。很明显,我期待应用程序的路由配置启动执行主控制器,但这不会发生。

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.

我是开发人员并且已经有一段时间了因为我配置了IIS,但我确实记得我不得不做一些摆弄IIS(6?)以使路由工作。

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.

我缺少什么?

推荐答案

确保您的应用程序池以集成模式运行,而非经典模式。

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

这篇关于在IIS 8.5上运行.NET 4.6 MVC应用程序(Windows Server 2012)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆