Dear All, I have an ASP.Net application that connects to multiple databases and therefore multiple domains. How can I use the SessionManager in this case ? or please guide me if there should be another way.

Thanks in advance

asked Oct 17 '10 at 06:10

msameer's gravatar image


edited Oct 17 '10 at 23:56

Alex%20Yakunin's gravatar image

Alex Yakunin

One Answer:

SessionManager is capable of providing one Session. So you can:

  • Either use it to provide the most important one among these sessions, and create all the others manually (i.e. using Session.Open(..., false), i.e. open, but don't activate).
  • Or don't use it at all. It's fully independent component, and moreover, it's pretty simple (the soucre if from v4.2, but AFAIK it didn't change since that version), so if you'd like, you can implement its analogue in your own code. But I don't recommend you to rely on Session.Current in this case - you need your own set of properties, since Session.Current allows to handle just one current Session.

Other things to remember:

  • Session activation and session switching.
  • Currently DataObjects.Net does not support System.Transactions (i.e. distributed transactions). Likely, you'll need this feature here - if so, please star & add comemnt to this issue. We'll implement it pretty fast.

answered Oct 18 '10 at 01:31

Alex%20Yakunin's gravatar image

Alex Yakunin

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA