views:

2523

answers:

2

I have an mvc app developed and tested with Cassini. Deployed to my site on GoDaddy, and the default page comes up fine. Click to log in, and I get a 404.

I'm running under IIS 7 there, so this is unexpected. My routes are pretty plain:

        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.MapRoute(
            "Default",                                              
            "{controller}/{action}/{id}",                           
            new { controller = "Public", action = "Index", id = "" } 
        );
        routes.MapRoute(
            "Report1",
            "Report/{action}/{start}/{end}",
            new { controller = "Report", action = "Index" }
        );
        routes.MapRoute(
            "Report2",
            "Report/{action}/{start}/{end}/{idList}",
            new { controller = "Report", action = "Index" }
        );

Any idea what might be going on or how I can troubleshoot this?

+7  A: 

Are you running in IIS7 integrated mode?

Classic mode of IIS7 does not automatically map extensionless URLs to ASP.NET (much like IIS6).

Also make sure your Web.config <system.webServer> tag is configured correctly.

Mehrdad Afshari
Thanks, Mehrdad. Turns out that GoDaddy defaults IIS 7 to classic mode.
Stuart
<system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer>
Christopher Edwards
A: 

I had troubling 404 errors until I copied over 'PrecompiledApp.config'

JoshRivers
Some more info maybe?
Christopher Edwards