Override the default page route handling doesn't work

Posted by nguyenthanh209415 on 12-Mar-2020 03:12

I do follow this document but look like it doesn't work, it doesn't run through any line code in class CustomSitefinityRoute
What should i do?
https://www.progress.com/documentation/sitefinity-cms/for-developers-override-the-default-page-route-handling

All Replies

Posted by jread on 13-Mar-2020 18:20

Do you have your Global.ascx in the Sitefinity Web Application registering your new type?

using System;
using System.Web;
using Telerik.Microsoft.Practices.Unity;
using Telerik.Sitefinity.Abstractions;
using Telerik.Sitefinity.Web;

namespace SitefinityWebApp
{
    public class Global : HttpApplication
    {
        protected void Application_Start(object sender, EventArgs e)
        {
            Bootstrapper.Initializing += Bootstrapper_Initializing;
        }

        void Bootstrapper_Initializing(object sender, Telerik.Sitefinity.Data.ExecutingEventArgs e)
        {
            if (e.CommandName == "RegisterRoutes")
            {
                ObjectFactory.Container.RegisterType<SitefinityRoute, CustomSitefinityRoute>();
            }
        }
    }
}

Posted by nguyenthanh209415 on 16-Mar-2020 02:35

Yes, I am. but it not go to the CustomSitefinityRoute. Is it work with you?

Posted by nguyenthanh209415 on 16-Mar-2020 02:35

Yes, I am. but it not go to the CustomSitefinityRoute. Is it work with you?

This thread is closed