Is there a SharePoint equivalent of the Session_End method, like the one in a normal ASP.NET Web Application Project?

I want to run some code when a user's Session ends, just like you would in a normal ASP.NET Web Application. The code takes data collected during the Session and stores it away.

I've read an article that describes how to enable Session State in SharePoint 2010 Server, but I'm not sure what this actually means in my case.

I've also read an article about adding a HTTP Module that inspects Sessions an acts upon them, but I'm not sure how this would work in SharePoint.

  • is the information critical to your application, do you still receive those events if the app pool dies/server restarts?
    – djeeg
    Commented Apr 14, 2011 at 3:18
  • @djeeg Not critical. It's the same type of information I'd want from Session_End.
    – ScarePoint
    Commented Apr 14, 2011 at 7:17

1 Answer 1


A similar post already answered this:

SharePoint equivalent of Application Start in Global.asax

SharePoint implements its own compiled assembly to handle events in the Global.asax and the class is sealed so you can't inherit it and override. You need to write a custom HTTP module to tap into the ASP.NET pipeline.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.