asp.netstateserver

StateServer context.Session[key] not available


I'm a newbie to the StateServer. In one of my website, session state mode is StateServer. I have a Imagehandler in one of my component and in that i try to retrive the Session using the key - as below

context.Session[key]

but always i see that the Session.Key.Count is 0 for StateServer. But for InProc it works. Can you please advise me and throw some light on where is go wrong?


Solution

  • Is the state server running? You might need to make sure the service is started AND set to Automatic within services.msc

    More info on the different session states from msdn