Click here to Skip to main content
15,923,789 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi Friends,

How to implement the session in wpf. Give an idea pls.
Posted
Comments
Sandeep Mewara 17-Mar-11 5:42am    
Session in WPF? Kindly elaborate.

WPF applications are stateful. That means that they do not need to store state in a persistent session. Are you perhaps trying to create an application wide datastore? If so, you can simply create a static class and assign values in there as appropriate (a session is just a Dictionary<string, object> internally).
 
Share this answer
 
Comments
#realJSOP 7-Apr-11 15:47pm    
5 - Proposed as answer
Pratik Bhuva 2-Nov-13 3:28am    
Thanks :)
[Adding to Pete's answer]

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:
http://msdn.microsoft.com/en-us/library/ms733040.aspx[^]
 
Share this answer
 

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