Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I asked this question on Stack Overflow, and it was suggested that this would be a better place to ask:

I have an mvc 2 application that is running in ii6 in the test environment and production server.

The test enviroment runs just fine, but after moving to production all pages except the home page server up 404 errors.

I have followed step 2, here: http://blog.codeville.net/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/ and added a .aspx extension to the route, and have tried the wildcard mapping. It doesn't appear to make any difference.

I put the diagnostic file found here: http://bradwilson.typepad.com/blog/2010/03/diagnosing-aspnet-mvc-problems.html into the directory and loaded it, but it does not report any errors or problems.

I even wiped the test server and reinstalled the app from scractch, setup the wildcard mapping and it worked fine.

Right now the pages are being routed like: Home.aspx/About and my routing table looks like this:

public static void RegisterRoutes(RouteCollection routes)
{
    routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
    routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });

    routes.MapRoute(
        "Default", // Route name
        "{controller}.aspx/{action}/{id}", // URL with parameters
        new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
    );


}

I'm at a loss here. Am I doing something wrong? Is there something wrong with the server?

share|improve this question
    
Have you tried running this Route Debugger to see if any of your routes are actually being matched? That's quite a nifty tool and has helped me out a few times. –  Ben Pilbrow Aug 23 '11 at 17:15
    
@Ben No I haven't, I'll take a look at it. Thank you. –  asawyer Aug 23 '11 at 17:24
    
@Ben I can't seem to get this to compile on mvc 2 .net 3.5 –  asawyer Aug 23 '11 at 17:48
    
Ah, I did wonder if it might be .net 4 only. I may have seen another route debugger for .net 3.5 somewhere though. –  Ben Pilbrow Aug 23 '11 at 17:52
    
Try this one - it does say there's a 3.5 version. You might have to get that one on NuGet. –  Ben Pilbrow Aug 23 '11 at 18:10
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.