Sessions in WCF
-
Hello guys, My question is can you somehow in WCF hold a session for every user that connects to WCF. And can that session be accesed from all the services in that WCF, and share the information in that session between each other? can this be done? your help is greatly appreciated. Thank you from adavance Regards, Christian Pace
-
Hello guys, My question is can you somehow in WCF hold a session for every user that connects to WCF. And can that session be accesed from all the services in that WCF, and share the information in that session between each other? can this be done? your help is greatly appreciated. Thank you from adavance Regards, Christian Pace
Unlike ASP.net, there is no 'Session' storage model. You would most likely have to write your own class that stores the variables (maybe a dictionary type) and make that class available statically. The static class then could be accessed by all client session instances (assuming you are using session instancing). The main thing is that these sessions aren't really way too reliable. They don't act like ASP.net sessions, and if a connection is closed and re-opened by the client the session id will be different on the service instance, thus, your 'session' variables should be short-term, made to persist for information that is shared between a series of calls, but not accessed randomly throughout the client's lifetime.
-
Unlike ASP.net, there is no 'Session' storage model. You would most likely have to write your own class that stores the variables (maybe a dictionary type) and make that class available statically. The static class then could be accessed by all client session instances (assuming you are using session instancing). The main thing is that these sessions aren't really way too reliable. They don't act like ASP.net sessions, and if a connection is closed and re-opened by the client the session id will be different on the service instance, thus, your 'session' variables should be short-term, made to persist for information that is shared between a series of calls, but not accessed randomly throughout the client's lifetime.
-
Thank you in fact that is my current implementation and know what I did is that I am identifing the users by means of