我一直在努力弄清楚为什么我的视图在演示环境中返回404错误,但在开发环境中没有出现这个问题。
- Windows Server 2008 R2
- IIS 7.5
- 已确保安装了MVC 2 Beta。
在我的Global.asax中,第一个路由条目如下:
routes.MapRoute(
"FindStore",
"FindStore",
new { controller = "FindStore", action = "Index" });
所有视图都已经存在并放置在正确的目录中。
基本上,如果我访问 http://StagingServer/FindStore,就会出现404错误。我看到的其他答案都与IIS 6有关,但我没有运行它。