I need a little help. I'm trying to host an MVC 2 application on IIS6. On my dev machine (XP) it runs perfectly in Cassini or as web site in IIS.
First i tried to reference the .mvc extension to aspnet_isapi but when that didn't work i went with the aspx extension instead.
Any ideas? I've probably missed something obvious.
public class MvcApplication : HttpApplication
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
AreaRegistration.RegisterAllAreas();
routes.MapRoute(
"Default", // Route name
"{controller}.aspx/{action}/{id}", // URL with parameters
new {controller = "Home", action = "Index", id = ""} // Parameter defaults
);
routes.MapRoute(
"Root",
"",
new {controller = "Home", action = "Index", id = ""}
);
}
protected void Application_Start()
{
RegisterRoutes(RouteTable.Routes);
}
}
EDIT:
Had some bad references that i cleaned out and is now stuck with this on my master page:
I think you should try this: http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With