ApplicationBase has been depreciated, please use ApplicationStartupHandler How?
I am trying to run a function on my application start.
In an old project (4.5.1) I did this:
public class MyGlobal : ApplicationBase
{
public MyGlobal()
{
DoFunction();
}
}
Now in 4.9.1 I am trying to do the same but it's telling me "ApplicationBase has been depreciated, please use ApplicationStartupHandler". If I try running it with the application base I get "the handle is invalid" error.
I can't work out how to use the applicationstartuphandler as I can't inherit from it.
ApplicationBase has been replaced with ApplicationStartupHandler, though in my experience ApplicationBase should still work fine.
Anyway, have you tried inherting from umbraco.businesslogic.ApplicationStartupHandler instead? I've done this with no issues, it still works the same way.
ApplicationBase has been depreciated, please use ApplicationStartupHandler How?
I am trying to run a function on my application start.
In an old project (4.5.1) I did this:public class MyGlobal : ApplicationBase { public MyGlobal() { DoFunction(); } }
Now in 4.9.1 I am trying to do the same but it's telling me "ApplicationBase has been depreciated, please use ApplicationStartupHandler". If I try running it with the application base I get "the handle is invalid" error.
I can't work out how to use the applicationstartuphandler as I can't inherit from it.
Can anyone point me at any examples?
Thanks
Bex
Hi Bex,
ApplicationBase has been replaced with ApplicationStartupHandler, though in my experience ApplicationBase should still work fine.
Anyway, have you tried inherting from umbraco.businesslogic.ApplicationStartupHandler instead? I've done this with no issues, it still works the same way.
-Tom
is working on a reply...