views:

16

answers:

1

I am a complete newbie,

I have the default to be HomeController->Index When I hit, http: / /localhost /SampleApplication

It goes to the index but I have another action "Process" in HomeController.If I hit http://localhost/SampleApplication/Home/Process returns resource not found.

I am unable to get this in Visual Studio execute/Dev environment or by deploying in IIS.

My Global.asax is,

public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

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

        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            RegisterRoutes(RouteTable.Routes);
        }

I could not get this going correctly in VS2010 itself.When I execute it launches a development server at port 1048.So I believe its more to do with my understanding or code in global.asax.

A: 

You've tagged this with IIS5 yet IIS5 doesn't support your nice MVC URLs out of the box. You will need to use a wildcard extension or you will need to change your urls to contain an extension that you can map to ASP.NET. See

http://stackoverflow.com/questions/57712/mvc-net-and-iis-5

http://stackoverflow.com/questions/301359/deploy-asp-net-mvc-on-iis-5-1-windows-xp

stucampbell
He could also install IIS Express if all he needs is an IIS server to develop on. http://weblogs.asp.net/scottgu/archive/2010/06/28/introducing-iis-express.aspx
SirDemon

related questions