Hi all,

I want to know the way of maintaining sessions in a WPF application. I did the same in ASP.Net but that was a web application. I'm not sure how to do the same task in WPF.

Any help is appreciated.


6 Years
Discussion Span
Last Post by pkumarSinha.399

WPF applications are stateful. Many WPF applications typically use WCF backends, and in this case state/session is managed through the service. So if you have multiple clients (with login capabilities) connecting to the same service, the service has mechanisms to identify each client and to maintain client-specific session state. There is no absolute standard to doing this and it's up to the developer to implement this however they want to.

That said WCF includes some kind of built-in session fucntionality (far simpler to what you have in ASP.NET). You can read about it here:

Click Here

Answer was taken from some forum. Hope it helps.


Thanks a lot for your help wen cai.
I will try this out. Have a nice day :)



In WPF application we are not abel to create session, but we can create object for information of user and we pass the object one form to another form, and use that information.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.