在 IIS 6 上使用 .NET 4 时获得 404,有或没有 MVC [英] Getting a 404 when using .NET 4 on IIS 6, with or without MVC

查看:23
本文介绍了在 IIS 6 上使用 .NET 4 时获得 404,有或没有 MVC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在相当多的 IIS 6 机器上完成了这个设置,但其中一个让我很不舒服.

I've completed this set up on a fair few IIS 6 boxes, but one is giving me a tough time.

添加应用扩展映射时出现问题:

The problem occurs when I add the application extension mapping to:

c:windowsmicrosoft.netframeworkv4.0.21006aspnet_isapi.dll

当它到位时,我在每个请求中都会收到 404 错误.

When this is in place, I get a 404 error on every request.

即使我从应用程序目录中删除除基本 test.htm 之外的所有文件并导航到该目录,我仍然会收到 404.

Even if I remove all files from the application directory apart from a basic test.htm and navigate to that, I still get a 404.

  • 我已取消选中验证该文件存在"
  • 我已经设置了一个 .NET 4 应用程序池并将我的应用程序指向该池
  • 我已将 ASP.NET 版本更改为 4.0.21006
  • 我检查了 IIS 日志文件,里面没有任何用处(它只显示每次重启后的第一组请求,然后停止记录)
  • 我检查了应用程序事件日志,但没有任何报告
  • 我已经安装了 MVC 2

我已经将设置复制到另一个盒子上,只是为了确保,遵循所有相同的步骤 - 一切正常!

I've copied the set up onto another box, just to be sure, following all the same steps - and it all works!

我还能注意什么??

注意:

如果我在 IIS 中将 .NET 设置为 v2,那么我可以成功导航到 est.htm

If I set .NET to v2 in IIS, then I can successfully navigate to est.htm

推荐答案

进入 IIS 中的 Web Service Extensions 并将 ASP.NET 4.0 设置为 Allowed 而不是 Prohibited.

Go into Web Service Extensions in IIS and set ASP.NET 4.0 to Allowed instead of Prohibited.

像这样:

顺便说一句:这在​​ .net 4 的 RTM 版本中也发生在我身上,所以不仅仅是测试版.

BTW: This happened to me in the RTM version of .net 4 as well, so it's not just the betas.

这篇关于在 IIS 6 上使用 .NET 4 时获得 404,有或没有 MVC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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