Copied to clipboard

Flag this post as spam?

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


  • Christopher Galvan 4 posts 24 karma points
    Mar 28, 2013 @ 22:38
    Christopher Galvan
    0

    Umbraco v6.0.2 - custom Global.asax

    I'm trying to get the global.asax file working with Umbraco. I've implemented a global.asax file based upon the following documentation: http://our.umbraco.org/Documentation/Reference/Mvc/custom-routes. However, none of the methods in my global.asax file are being hit on application startup. Has anyone got this working in this version of Umbraco?

     

    Thanks

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Mar 29, 2013 @ 05:57
    Tom Fulton
    0

    Hi Christopher,

    Here's how I'm doing it and all seems to be working fine:

     

    public partial class Global : UmbracoApplication
    {
     
            protected override void OnApplicationStarted(object sender, EventArgs e)
            {
                base.OnApplicationStarted(sender, e);
                RegisterRoutes(RouteTable.Routes);
            }

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

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

                // Add your routes here as normal
            }
        }

     

    Hope this helps,
    Tom 

Please Sign in or register to post replies

Write your reply to:

Draft