IIS 上的 ASP.NET MVC 落入静态文件处理程序 [英] ASP.NET MVC on IIS falls through to the static file handler

查看:20
本文介绍了IIS 上的 ASP.NET MVC 落入静态文件处理程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 ASP.NET MVC 站点的问题.

I have a problem with an ASP.NET MVC site.

这些是细节:

  1. ASP.NET MVC 2
  2. ASP.NET 4 集成管道
  3. Windows Web Server 2008 R2 上的 IIS 7.5

每当我向应用程序发出请求时,我都会收到HTTP 错误 404.0 - 未找到"错误,详细的错误信息显示它是报告错误的静态文件处理程序:

Whenever I make a request for the app I get the "HTTP Error 404.0 - Not Found"-error and the detailed error information shows it is the static file handler that reports the error:

  • 模块:IIS Web 核心
  • 通知:MapRequestHandler
  • 处理程序:StaticFile
  • 错误代码:0x80070002

表示该请求从未进入 MVC 堆栈.

meaning that the request never entered the MVC stack.

我应该注意到,IIS 已经在同一个应用程序池上提供了 ASP.NET MVC 3,在 ASP.ENT 2 应用程序池上提供了 MVC 2.所以让我头疼的是 ASP.NET 4 应用程序池上的组合 ASP.NET 2.

I should note that the IIS already serves a ASP.NET MVC 3 on the same app pool and a MVC 2 on a ASP.ENT 2 app pool. So it's the combo ASP.NET 2 on the ASP.NET 4 app pool that are giving me headaches.

基本上我想将应用程序从 ASP.NET 2.0 应用程序池上的 ASP.NET MVC 2 升级到 ASP.NET 4.0 应用程序池上的 ASP.NET MVC 2.

Basically I want to upgrade the app from ASP.NET MVC 2 on a ASP.NET 2.0 app pool to a ASP.NET MVC 2 on a ASP.NET 4.0 app pool.

有什么想法吗?

推荐答案

我看到你解决了你的问题,但是对于任何谷歌搜索的人:

I see you fixed your issue, but for anyone googling:

我遇到了这个问题,就我而言,我只需要将 ASP.NET 4 注册到 IIS.我正在删除并重新添加网络以解决其他问题,但只是忘记了这样做.对我有用的命令是:

I had this issue and in my case I just needed to register ASP.NET 4 with IIS. I was deleting and re-adding webs to fix other issues and simply forgot to do that. The command that worked for me was:

C:WindowsMicrosoft.NETFramework64v4.0.30319>aspnet_regiis -i

您自己的 .net 版本可能会有所不同,尤其是如果您在未来,所以上述路径可能并不完全正确.

Your own .net version may be different, especially if you are in the future, so the above path may not be exactly right.

这篇关于IIS 上的 ASP.NET MVC 落入静态文件处理程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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