Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm converting from U7 V7.15.4 to U8 V8.10.0
I have created a component to replace ApplicationOnStart but i'm a little puzzled about what to so with the other events in ApplicationEventHandler ie: ApplicationBeginRequest, Session_Start and OnApplicationError (that i'm overriding in V7)
Should I keep global.asax for that or add some event listeners in a component?
Probably something like:
public class ApplicationComposer : ComponentComposer<ApplicationComponent>, IUserComposer
public override void Compose(Composition composition)
public class ApplicationComponent : IComponent
private readonly IErrorLogService _errorLogService;
public ApplicationComponent(IErrorLogService errorLogService)
_errorLogService = errorLogService;
public void Initialize()
//How do I get the ApplicationEventHandler in Umbraco???
Umbraco.Core.Application.BeginRequest += Application_BeginRequest;
Umbraco.Core.Session.Start += Session_Start;
Umbraco.Core.OnApplicationError += OnApplicationError;
//code that originally was in Application_OnStart here
public void Terminate()
private void Application_BeginRequest(Object source, EventArgs e)
private void Session_Start(object sender, EventArgs e)
private override void OnApplicationError(object sender, EventArgs e)
I hope it makes sense and that somebody can help
My hunch here is you could handle the UmbracoApplicationBase ApplicationInit event
see this approach in the core:
This event would give you access to the underlying HttpApplication app, from which I reckon you could bind to the Begin Request?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted