How to prevent Session variables from being shared by various Silverlight clients.

XTO
XTO used Ask the Experts™
on
I've heard that if I send data from a Silverlight client to a asp.net server (through WCF) and store it in a session (on the server) that other users on other clients can access that session data also.
Is that true?
I don't want that to happen. I want each client to be able to store his own data and retrieve it later.
How do I make sure that happens?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
This depends how you handle session in your WCF service. There are different InstanceContextModes, one of them is Single - in this case session is shared amongst ALL clients. What you want to use is PerSession. More info can be found here:

http://msdn.microsoft.com/en-us/library/system.servicemodel.sessionmode.aspx
http://msdn.microsoft.com/en-us/library/ms733040.aspx

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial