Copied to clipboard

Flag this post as spam?

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


  • Colin Mackay 4 posts 54 karma points
    Jun 20, 2013 @ 12:24
    Colin Mackay
    0

    My IApplicationEventHandler class is not being called

    I have a project that has an class implementing IApplicationEventHandler. When it was set up originally it worked fine, however, when I open the solution elsewhere (it is source controlled) the IApplicationEventHandler class is not being called (which is obviously causing other problems later on)

    I can see from the stack trace that when it works my IApplicationEventHandler class is called from the CoreBootManager. Is there any way to debug that process? I'm guessing it also is not running, or if it is then it is somehow not picking up my class.

    I'm guessing something is missing from source control, but I'm at a loss as to what that could be.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jun 20, 2013 @ 12:31
    Jeroen Breuer
    0

    Hello,

    What version are you on? The IApplicationEventHandler changed between some versions so it's possible it works on an old version, but not in newer versions. More info here: http://issues.umbraco.org/issue/U4-1546

    Jeroen

  • Colin Mackay 4 posts 54 karma points
    Jun 20, 2013 @ 12:31
    Colin Mackay
    0

    Sorry, I'm on 6.1.1

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jun 20, 2013 @ 13:05
    Jeavon Leopold
    1

    Hi Colin,

    Application startup has changed in Umbraco v6.1+ - there is a documentation page about it here

    Hopefully if you update it will work.

    Jeavon

  • Colin Mackay 4 posts 54 karma points
    Jun 20, 2013 @ 13:06
    Colin Mackay
    100

    I've figured it out. Basically, I was trying to integrate Umbraco to an existing application, and naturally the exising application had its own global.asax file. I noticed this post: http://our.umbraco.org/forum/developers/extending-umbraco/39907-Globalasax-replacement-in-Umbraco-6

     

    After reading that I changes the global.asax to read:

    @ Application Codebehind="Global.asax.cs" Inherits="Umbraco.Web.UmbracoApplication" Language="C#" %> 

    After that it worked.

     

    I have no idea how or why it worked previously in the other branch. It still has the old global.asax file, yet I can fire up the application and it all works.

    I should also have said that the project has only ever had umbraco 6.1.1. applied to it. I only started integrating Umbraco into the application earlier this week.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jun 20, 2013 @ 13:12
    Jeroen Breuer
    0

    How old is the other branch? Like Jeavon pointed out the event handlers have changed a lot. For example see before 4.8 or 4.8+. In those versions umbraco didn't use it's own global.asax. Some more info here: http://issues.umbraco.org/issue/U4-1173

    Jeroen

  • Colin Mackay 4 posts 54 karma points
    Jun 20, 2013 @ 13:17
    Colin Mackay
    0

    Both branches were created this week. The first was when I started integrating Umbraco into the project. The second branch was created to make sure that I had put everything needed in to source control. Prior to this week the project was stand-alone. Both have Umbraco 6.1.1 (the only version of Umbraco that this project has ever used).

Please Sign in or register to post replies

Write your reply to:

Draft