EPiServer and global.ascx inheritence

Vote:
 

Hello,

I am integrating another product to work on EPiServer and that product also requires that global.ascx inherits from OtherProduct.Global. I see that EPiServer also wants global.asx to inherit from EPiServer.Global - if I remove that, EPiServer does not like it. Clearly, I can not inherit from 2. Either OtherProduct.Global needs to inherit from EPiServer.Global or EPiServer.Global needs to inherit from OtherProduct.Global to maintain the chain of inheritence. Unfortunately, I see that both EPiServer and the other product has blackboxed their Global.dll. Any suggestions? :|

#74966
Sep 12, 2013 19:06
Vote:
 

Typically you can copy out the required code using Reflector, ILSpy or similar and add it to your own custom Global class.

Frederik

#74977
Sep 13, 2013 8:32
Vote:
 

Bare minimum you need to do is to call thse 2 lines in your custom global class constructor:

using EPiServer.Web.Routing;

..

EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType.WebApplication);
RouteTable.Routes.RegisterRoutes();

    

Not sure of complexity of that "other product" however I think that you should try to inherit more from EPiServer global site class rather than from product global class as there is much more stuff going on actually behind the scene in EPiServer global class.

#75017
Sep 15, 2013 22:29
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.