How could I add my own code to the global.asac.cs file (currently found in umbraco.web.imbracoapplication) I think I need to use the one supplied by umbraco 7 but I would also like to add my own choice to certain events?
This allows you to hook into events when Umbraco is starting or has started. Plus you get access to the ApplicationContext which means you can access services & the database.
If you really need to override it for some very special reason, you can inherit from the UmbracoApplication class and change the Global.Asax to point it to your own class.
How to add my logic
How could I add my own code to the global.asac.cs file (currently found in umbraco.web.imbracoapplication) I think I need to use the one supplied by umbraco 7 but I would also like to add my own choice to certain events?
Thanks
Hey Bob, What kind of logic do you need to add?
Have you consider writing a class which extends from ApplicationEventHandler?
This allows you to hook into events when Umbraco is starting or has started. Plus you get access to the ApplicationContext which means you can access services & the database.
Thanks,
Jamie
Jamie is right. Use the ApplicationEventHandler.
If you really need to override it for some very special reason, you can inherit from the UmbracoApplication class and change the Global.Asax to point it to your own class.
Thanks guys. I will try it out and get back should I come across any issues
is working on a reply...