Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bex 444 posts 555 karma points
    Nov 19, 2012 @ 18:08
    Bex
    0

    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

     

     

     

     

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Nov 20, 2012 @ 06:48
    Tom Fulton
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft