mvc2 host on iis6 : The incoming request does not match any route.

Posted by Sefer KILIÇ on Stack Overflow See other posts from Stack Overflow or by Sefer KILIÇ
Published on 2010-06-14T20:29:27Z Indexed on 2010/06/14 20:32 UTC
Read the original article Hit count: 681

Filed under:
|

I have to host my project on iis6, I can not change iis setting on server. So, I modified global.asax like below. But when I browse project I got error like : The incoming request does not match any route.

have any idea? thanks

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


            routes.MapRoute("Default", // Route name
                  "{controller}.aspx/{action}/{id}",
                  new { controller = "Home", action = "Index", id = "" }  // Parameter defaults )
                  );
            routes.MapRoute("Detail", // Route name
                   "{controller}.aspx/{action}/{id}/{sid}",
                   new { controller = "Home", action = "Index", id = "", sid="" }  // Parameter defaults )
                   );
            routes.MapRoute("ForGoogle", // Route name
                   "{controller}.aspx/{action}/{friendlyUrl}/{id}/{partialName}",
                   new { controller = "Home", action = "Index", friendlyUrl = "", id = "", partialName =""}  // Parameter defaults )
                   );
            routes.MapRoute(
                    "PostFeed",
                    "Feed/{type}",
                    new { controller = "Product", action = "PostFeed", type = "rss" }
                );

        }

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about asp.net-mvc-2