views:

121

answers:

1

I have an MVC app that is actually on a couple other servers but I didn't do the deploy. For this deploy I have added the wildcard to aspnet_isapi.dll which has gotten rid of the 404 error. But the pages are not pulling up, rather everything is just blank. I can't seem to find any IIS configuration differences. The Global asax.cs file does have routing defined, but as I've seen on a working server, that file isn't just hanging out in the root or anything so obvious. What could I be missing here?

All of the servers are running IIS6 and I have compared the setups and they look the same to me at this point.

Thanks... Bryan

EDIT for the comments thus far: I've looked in the event logs with no luck, and scoured various IIS logs per David Wang: blogs.msdn.com.

Below is the Global.asax.cs file...

public class MvcApplication : System.Web.HttpApplication
{
    public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
        routes.IgnoreRoute("error.axd"); // for Elmah

        // For deployment to IIS6
        routes.Add(new Route
        (
            "{controller}.mvc/{action}/{id}",
            new RouteValueDictionary(new { action = "Index", id = (string)null }),
            new MvcRouteHandler()
        ));

        routes.MapRoute(
            "WeeklyTimeSave",
            "Time/Save",
            new { controller = "Time", action = "Save" }
        );

        routes.MapRoute(
            "WeeklyTimeAdd",
            "Time/Add",
            new { controller = "Time", action = "Add" }
        );

        routes.MapRoute(
            "WeeklyTimeEdit",                                              
            "Time/Edit/{id}",                                       
            new { controller = "Time", action = "Edit", id = "" }  
        );

        routes.MapRoute(
            "FromSalesforce",
            "Home/{id}",
            new { controller = "Home", action = "Index", id = "" });

        routes.MapRoute(
            "Default2", 
            "{controller}/{id}",
            new { controller = "Home", action = "Index", id = "" }  
        );

        routes.MapRoute(
            "Default", 
            "{controller}/{action}/{id}",  
            new { controller = "Home", action = "Index", id = "" }
        );

    }

    protected void Application_Start()
    {
        RegisterRoutes(RouteTable.Routes);
    }
}

Maybe this is as stupid as the asax file not being somewhere it needs to be, but heck if I know at this point.

+2  A: 

Here is the main guide that helped me out the most when deploying ASP.NET MVC 1.0 on IIS6:

http://www.hanselman.com/blog/DeployingASPNETMVCOnASPNET20.aspx

And since it kinda butchers the whole idea of friendly names in REST architecture, heres a solution to the file name extension issue:

http:/slashflux88DOTcom/blog/using-asp-net-mvc-on-iis-6-without-the-mvc-extension/

Sorry for the obfuscated URL, SO hit me with a spam blocker.

Joseph Barbere
This is our "other" dev server and it has 3.5 installed. I think all of this boils down to the IIS/Virtual Directory URL routing that I'm just not seeing. But that Hanselman link is pretty informative on hacking 2.0 to run MVC.
BryanGrimes