Looking for this session identifier for logging purposes…
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Generally WCF services should be stateless. The default is for them to be stateless without a session id that would tie the server to the client. Unless you have a really good reason (outweighing the performance hits) to maintain state, I’d keep them stateless and sessionless.
That said, you can have per-session WCF services which will allow you to do what you’re asking.
This article (link) goes into some detail on instance management with WCF.
For in-depth discussion, take a look at Chapter 4 in Juval Lowy’s Programming WCF Services (link) which is all about state management in WCF services.