I'm writing SharePoint webparts that are communicating with external system. Currently, on each request, a connection with system is made, user is authenticated and session is established - than custom code which interacts with external system can be executed.

Such solution is very slow. I would like to create connection with external system when user logs to SharePoint and destroy it when user logs out. Such thing could be achieved by session mechanism.

Is there any possibility to hook up to session start/session end events in SharePoint?

2 Answers 2


SharePoint does not have sesssion events. Those are part of the ASP.NET framework and are typically hooked in via global.asax.

However, what you describe is a somewhat risky plan. Lots of opportunities for abuse/hackers.

  • 1
    Why it is risky ? Commented Sep 14, 2012 at 14:54

as Paul stated it not recommended, a few pointers here:


on that note you can do what you want just using webservices or WSRP :)


hope this helps :)


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.