Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to save data in session inside the WCF service in the first call and then use that data in further call of the service.

Basically what i need to do is call a method in WCF service while log in, this will get some data from database and will be placed in session say using the HttpContext, i see that this data is available in the same call util i return back to the client. But i need to have that data in session even for the next call to the service, will this be possible, please can you point me to some examples to achieve this.

What I have tried:

I have verified the Operation Context session id also, it is getting changed for each call.
Posted
Comments
________________ 4-Dec-17 5:21am    
I suggest to check current InstanceContextMode (https://www.codeproject.com/Articles/188749/WCF-Sessions-Brief-Introduction) of you WCF service.
It could be set "PerCall" - so each time you will have new service object.
Try to set it "PerSession".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900