views:

17

answers:

1

I have an existing web site setup on my local IIS built with web forms setup in this format:

-MainSite  
  -Application1
  -Application2 
  -Application3

There are separate applications in each location, so MainSite has an application, and Application1 has another application and so on. This way development on different applications in the same site can be broken out. I want to add a new Application that is MVC instead of web forms. I created a new MVC project which runs in Cassini just fine, but when I create a new IIS application for it and point it to the MVC project I am unable to navigate to it in the browser and get a 404 error. I am expecting to be able to navigate to http://MainSite/NewMVCApplication/. I want the root of NewMVCApplication to point to my Contacts Controller.

My global.asax in the new MVC application currently looks like this:

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

        routes.MapRoute(
            "Root",                                              // Route name
            "",                           // URL with parameters
            new { controller = "Contacts",  action = "Index", id = "" }  // Parameter defaults
        );

    }

    protected void Application_Start()
    {
        RegisterRoutes(RouteTable.Routes);
        RouteDebug.RouteDebugger.RewriteRoutesForTesting(RouteTable.Routes);
    }
}
A: 

Make sure NewMVCApplication is running in an integratedMode pipeline application pool.

Sijin
Already checked. It is.
Corey Sunwold