Hi @hkdave95, @larsholm, and @bbqchickenrobot;
I am also experiencing this problem. I am looking into a solution for this too.
C1 has a custom RouteBase registration in the form of C1PageRoute. When executing the 'RouteTable.Routes.GetRouteData' method, it hits the C1PageRoute.GetRouteData method, in which there is the following condition check:
In the mean time I hope one of you have already found a solution to this, that's why I am poking this thread again. :)
Thanks
I am also experiencing this problem. I am looking into a solution for this too.
C1 has a custom RouteBase registration in the form of C1PageRoute. When executing the 'RouteTable.Routes.GetRouteData' method, it hits the C1PageRoute.GetRouteData method, in which there is the following condition check:
Verify.IsFalse(context.Items.Contains(HttpContextItem_C1PageUrl), "C1PageRoute was executed twice during the same request. If could be f.e. because there's an MVC player that have a route that matches a C1 page url.");
I am not 100% sure yet why they have to have this guard here, I'll have to try and figure out the code a bit more. I can only assume for now that the requesting of RouteData must then add/change the context in some manner, which would break if executed more than once. I don't know if this is good practice, as we should be able to request RouteData at any time surely? Again, I could be completely wrong here - I am still ignorant in this matter - this is purely guess work at this stage for the existence of the precondition. I'll dig and feed back.In the mean time I hope one of you have already found a solution to this, that's why I am poking this thread again. :)
Thanks