Sessions in WCF
-
I am having service factory pattern implemented in WCF service and i have wrapped an object in session which i want to use in WCF. Now the thing is when i add the object it is there in session w=but when i want to use it in another class session is null. How can i manage session within classes any help is appreciated
-
I am having service factory pattern implemented in WCF service and i have wrapped an object in session which i want to use in WCF. Now the thing is when i add the object it is there in session w=but when i want to use it in another class session is null. How can i manage session within classes any help is appreciated
You're interpretation of WCF sessions is incorrect. WCF Sessions are not ASP.NET Sessions, they mean "a communications session between the client and the WCF service" - It's an instancing mode for the service itself, not a storage state or anything like HTTP/ASP.NET sessions. To utilize ASP.NET sessions in WCF you have to tinker a bit: Try looking at this.[^] To learn more about the meaning of WCF sessions: try this[^]
-
I am having service factory pattern implemented in WCF service and i have wrapped an object in session which i want to use in WCF. Now the thing is when i add the object it is there in session w=but when i want to use it in another class session is null. How can i manage session within classes any help is appreciated
did you try to put your object in Contructor of the Class?