Hi I am trying to wire into the Session)Start and Session_End events using Umbraco 4.11. I have implemented IApplicationEventHandler but cant figure out how to wire up the event.
i have tried this in all 3 methods OnApplicationStarting, OnApplicationStarted and OnApplicationInitialized but the methods never get called. additionally i have added the following to the web config file in the system.webServer > modules area
Have kinda got this working but am not happy with the hack and dont know if it will cause any adverse effects, woudl appreciate if someone could comment on whether this is bad ... or indeed how bad it is.
I have added the following code to the Global.asax file and with breakpoints on it goes into these 2 methods.
According to this thread over at the asp.net forums, Global.asax is the correct place to wire into the session events, not (SessionStateModule)(httpApplication.Modules["Session"]).Start and (SessionStateModule)(httpApplication.Modules["Session"]).End. Emphasis mine:
IIRC, the 4 event handlers (App_Start, App_End, Session_Start, Session_End) are all "special" event handlers and global.asax is the only place you're allowed to have them.
Excuse the necromancy, I thought it might be helpful for other people in the future.
Wiring into session events
Hi I am trying to wire into the Session)Start and Session_End events using Umbraco 4.11. I have implemented IApplicationEventHandler but cant figure out how to wire up the event.
Any guidance would be appreciated
After a little more digging around i have added the following
i have tried this in all 3 methods OnApplicationStarting, OnApplicationStarted and OnApplicationInitialized but the methods never get called. additionally i have added the following to the web config file in the system.webServer > modules area
If anyone has any thoughts or guidance it would be greatly appreciated
Have kinda got this working but am not happy with the hack and dont know if it will cause any adverse effects, woudl appreciate if someone could comment on whether this is bad ... or indeed how bad it is.
I have added the following code to the Global.asax file and with breakpoints on it goes into these 2 methods.
<script language="C#" runat="server">
public void Session_OnStart() {
}
{
}
Hi I am hoping to get some guidance (ideally from the core team) as to the correct way to do this, any help would be appreciated
I am having the same issue.
Throughout the several Umbraco versions there have been made a lot of changes, at least this is the idea I get when searching for answers (googe).
Solutions range from delete a dll / inheriting global or application objects (both umbraco). All of those 'answers' regarding umbraco 4.x
What I really would love to see is a bit of help here and hopefully a solution for both Asif Malik and me regarding Session_Start events in 4.11
After that, for god sake, stick to a (any) plan for a couple of years.
Hi Remco, if you want a temporary solution then i would advise you to edit the relevant event in the Global.asax file as mentioend above.
Asif
This code posted earlier appears to be the correct way to do this.
According to this thread over at the asp.net forums, Global.asax is the correct place to wire into the session events, not
(SessionStateModule)(httpApplication.Modules["Session"]).Start
and(SessionStateModule)(httpApplication.Modules["Session"]).End
. Emphasis mine:Excuse the necromancy, I thought it might be helpful for other people in the future.
is working on a reply...