I created a WCF Service, Hosted it in IIS and created a web application client for it.
Every thing works fine.
problem is, when I enable session in WCF service with all the required attributes it created one problem.
My service has several functions. function which I want to execute first is my Login functionality, so i set IsInitiating=true.
and IsInitiating=false on all other functions.
now from client side it works fine when i call the Login Function. but when i try to call other functions once the client is logged in it generate an exception , that function XYZ can not be call first because IsInitiating is set to fale;
I think the problem is every time when my page is posted back on the server it created a new instance of my wcf service which establish a new session with the server. how to maintain the same proxy for all the events in my web 开发者_JAVA技巧application?
I have very interesting link for you, which probably could solve your problem. http://www.codeproject.com/KB/WCF/Sessions_in_WCF.aspx
精彩评论