I want to maintain session on a windows application.
How do I maintain the session of a user like we use in ASP.NET to track the user information?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you mean, how one can serialize program settings the user has done using your app, and you want to restore them after the program has restarted, an easy way is the built in settings-management. This works with WinForms and WPF:
In VS under properties, you can define all settings that in the app are used (inclusive data-type) and then you can set and get values over the
Properties.Settings.Default-Property. Please note that there exists two type of settings: Application and User. The one you will need to save “session”-state of your user, is User.See here for more information about saving settings in .net windows applications.