locked
Session state not working across multiple web front ends RRS feed

  • Question

  • I've developed a web part that queries a Sharepoint List and then stores the data in a Session DataTable for reuse and works fine in an environement with one front end server. When I move it to an environment with mutiiple web servers I begin to have issues maintaining the session across front ends. As long as my session is maintained on the same front end that it initated from, it is fine but once the load balancer switches the client to a different front end, the session becomes lost.

    I'm pretty sure my SSP is setup correctly and even rebuilt it just to make sure. These are virtual environments running on VMWare. Any ideas on what I can check for to troubleshoot this issue?

    Wednesday, June 1, 2011 4:43 PM

Answers

  • Hi,

    Thanks to share your post.

    For the issue, here is a scenario which I think may give you a hand:

    The SPPropertyBag will store objects, but unless you use a unique key per user the stored object for one user will be the same as for every other user, which doesn't really give a "session state" scenario. And the property bag will hold on to these objects until you explicitly delete them, which will mean you may end up with a lot of garbage attached to your SPWeb.

    If you only have a single front-end, ASP.NET caching may be the way to go. However this won't work if you have multiple front-end in a load balanced config because the cache is not synched across multiple servers.

    Hope it helps!

    Leo

    • Marked as answer by Emir Liu Thursday, June 9, 2011 2:11 AM
    Friday, June 3, 2011 9:16 AM