Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
    
is the information critical to your application, do you still receive those events if the app pool dies/server restarts? –  djeeg Apr 14 '11 at 3:18
    
@djeeg Not critical. It's the same type of information I'd want from Session_End. –  ScarePoint Apr 14 '11 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.

share|improve this answer
    
Do you mean something like this? theviewfromlevel9.wordpress.com/2010/04/20/… Are you sure this will work with SharePoint? Sessions seem a bit quirky in SharePoint. –  ScarePoint Apr 14 '11 at 7:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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