Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • kunta 10 posts 30 karma points
    Apr 09, 2012 @ 19:21
    kunta
    0

    registering route umbraco 4.7 is not working

    I have seen post stating that it's possible to add routes to global like the following:

     

    public class MyClass : umbraco.Global
        {

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

                routes.MapRoute(
                    "mbldev", // Route name
                    "mobile/", // URL with parameters
                    new { controller = "Mobile", action = "mobile_home", id = "" }
                );
                          
            }

            protected override void Application_Start(object sender, EventArgs e)      
            {                       

                AreaRegistration.RegisterAllAreas();

                RegisterRoutes(RouteTable.Routes);           

                base.Application_Start(sender, e);
            }

    }

     

    The bottom line is that this code does not work. It does now register the route correctly. Can someone explain what is wrong here? Better yet is there any documentation whatsover to explain how to extend in this manner (these stupid helloword examples are not real world and worthless)

    Thanks,

  • kunta 10 posts 30 karma points
    Apr 09, 2012 @ 19:36
    kunta
    0

    The bottom line is that this code does not work. It does not register the route correctly. Can someone explain what is wrong here? Better yet is there any documentation whatsover to explain how to extend in this manner? (these stupid helloword examples are not real world and worthless)

Please Sign in or register to post replies

Write your reply to:

Draft