在IIS 7.5 ASP.NET MVC 4,返回404事做扩展名路由映射 [英] ASP.NET MVC 4 on IIS 7.5, returns 404. Something to do with extensionless route mapping

查看:213
本文介绍了在IIS 7.5 ASP.NET MVC 4,返回404事做扩展名路由映射的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经部署了一个MVC 4网站使用IIS 7.5在Windows 2008 R2服务器。 .NET 4.5安装在服务器上。

I have deployed an MVC 4 web-site to a Windows 2008 R2 server with IIS 7.5. .NET 4.5 is installed on the server.

该网站能正常工作本地。所有的路由工作正常。但是,当我把它放在服务器上,没有什么作品。我已经证实,在DNS /结合是通过将一个静态文本文件中的现场工作和这个工作

The site works fine locally. All routing works fine. However, when I put it on the server, nothing works. I have confirmed that the DNS/binding is working by putting a static text file in the site and this works.

下面几件事情我已经试过:

Here's a few things I've tried:


  • 的默认路由/返回403.13 - 显示目录浏览被禁用(正确的)。这肯定应该映射到/ home /指数?

  • 任何途径(如/机构,组织/指数)只返回404。

  • 确信我所有的dll复制(按<一个href=\"http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx\">http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx)

  • The default route / returns 403.13 - indicating directory browsing is disabled (correct). This should surely map to /home/index?
  • Any route (eg. /Organisation, Organisation/Index) simply returns 404.
  • Made sure all my DLLs are copied over (as per http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx)

我已经试过/证实:

我缺少的东西吗?我绝望的下一幕是安装完整的ASP.NET MVC 4堆栈包括Visual Studio的前preSS,SQL防爆preSS等只是为了看看它是否工作。我真的不想做的事。这是一个生产服务器!

Am I missing something? My next act of desperation is to install the full ASP.NET MVC 4 stack including Visual Studio Express, SQL Express, etc. just to see if it works. Which I really don't want to do. This is a production server!

更新:
我要补充一点,在同一网站上的作品带内部等效的配置,中间服务器上。

Update: I should add that the same site works on en equivalent configuration in-house, on a staging server.

推荐答案

我有同样的问题。还有,你应该尝试修复程序:
http://support.microsoft.com/kb/980368
它固定我的问题。

I had this same issue. There's a hotfix you should try: http://support.microsoft.com/kb/980368 It fixed the issue for me.

这篇关于在IIS 7.5 ASP.NET MVC 4,返回404事做扩展名路由映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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