获取MVC的网站404错误 [英] Getting 404 error on MVC web-site

查看:148
本文介绍了获取MVC的网站404错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个IIS7.5网站,Windows Server 2008上,与部署到它的一个ASP.NET MVC2网站。该网站建于Visual Studio 2008中,针对.NET 3.5和IIS 5.1已成功配置来运行它,以及为本地测试。

I have an IIS7.5 web-site, on Windows Server 2008, with an ASP.NET MVC2 web-site deployed to it. The website was built in Visual Studio 2008, targeting .NET 3.5, and IIS 5.1 has been successfully configured to run it as well, for local testing.

然而,每当我尝试并导航到IIS7页面运行,我得到一个404错误。

However, whenever I try and navigate to a page running in IIS7, I get a 404 error.

我已经检查了以下几点:

I have checked the following things:


  • <击>有一个在IIS日志没有相应的404日志条目。

    • 其实,有的在IIS日志条目404

    • There is no corresponding 404 log entry in IIS logs.
      • Actually, there are 404 entries in the IIS log.

      修改
      好了,我们已经安装了目前世界上最简单的MVC应用程序(当您创建在Visual Studio中新MVC2项目,该项目创建的),我们仍在我们尝试任何页面和访问上获得404 - 例如
      &LT; my_server的方式&gt; /首页/关于将产生404

      任何想法将大大AP preciated!

      Any ideas will be greatly appreciated!

      推荐答案

      我们终于通过导出一个工作服务器的IIS配置,并将其与我们的钉这个问题。

      We finally nailed this issue by exporting the IIS configuration of a working server, and comparing it to ours.

      这是已被从默认的改变真的不起眼的设置。

      It was a really obscure setting which had been changed from the default.

      IIS ROOT&RARR;请求过滤和RARR;文件扩展名选项卡&RARR;编辑功能设置与RARR;允许未列出的文件扩展名。

      IIS ROOT → request Filtering → Filename Extensions Tab → Edit Feature Settings → Allow unlisted file name extensions

      这应该被选中。

      这可以在IIS级别进行设置,或者在站点级。

      This can be set at the IIS level, or the site-level.

      这篇关于获取MVC的网站404错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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