5
votes

I've been trying to figure out why my views are returning 404 in my staging environment, but not my development environment.

  • Windows Server 2008 R2
  • IIS 7.5
  • MVC 2 Beta definitely installed.

The first Route entry in my Global.asax is as follows:

        routes.MapRoute(
            "FindStore",
            "FindStore",
            new { controller = "FindStore", action = "Index" });

All views are definitely present and in the proper directories.

Basically if I go to http://StagingServer/FindStore I get a 404 error. Every other answer I've seen has to do with IIS 6. which I'm not running.

4

4 Answers

8
votes

We had a similar problem. We checked integrated mode, permissions, and runAllManagedModulesForAllRequests. No dice. Eventually this windows hotfix fixed it.

2
votes

It ended up being because my App Pool was running in Classic mode.

1
votes

I am not sure if this will help but there was an issue reported on Stack Overflow that uses both technologies and involves a similar problem: Getting an ASP.MVC2/VS2010 application to work in IIS 7.5

I would check it out and see if it helps.

1
votes

I had the same problem, my App Pool was set to Classic and I had changed it to use the .NET 4.0 Framework, but it didn't start working until I recycled the App Pool.