5

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 Answers 4

8

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

2
  • Thank you! this is what finally fixed this problem for us. What a pain, because pure MVC3 apps were working fine on the same server. It was just the hybrid apps that were having problems.
    – javram
    May 18, 2012 at 14:32
  • This fixed my problem too! Although I still don't really understand why or how.
    – MEMark
    Sep 3, 2013 at 18:31
2

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

1

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.

2
  • This tutorial may also help Using ASP.NET MVC with Different Versions of IIS (C#) asp.net/learn/mvc/tutorial-08-cs.aspx
    – Alos
    Jan 14, 2010 at 16:45
  • That's not a bad idea. unfortunately both "HTTP Redirection" and "HTTP Errors" are installed. ... although I had JUST installed them for other reasons earlier today, perhaps a reboot is in order? ... I'll have to check. Also I've been going through that microsoft tutorial already, it's actually linked at the top of the Global.asax.cs file put out by an MVC project.
    – Ben Lesh
    Jan 14, 2010 at 16:57
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.