SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

share|improve this answer
Why it is risky ? – user1252773 Sep 14 '12 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 :)

share|improve this answer

Your Answer


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.