2

Hello I am creating a Windows application (WPF) that is going to be running in few stations accessing 1 database.

I already implemented a login form with a login system thru My.User.CurrentPrincipal. Now, I want to implement a "Remember me on this computer" check box in the login form, where should I store the value?

Should it be a cookie? a .settings value? or what good other suggestion do you have.

Update
Also what data (i.e. what value) shoud I store, I want it to be secure, that users should not be able to copy the values etc.

Thanks in advance!

Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
  • Would you want a TTL (time to live) for the "remember me" functionality? Should the program ask them to re-enter user name and password after a predetermined amount of time? Scenario - User logs in with Remember Me set to true and a TTL of 2 days. They can open and close app without being prompted to log in for that time period, but, after that, they will be prompted to log in again. – brad.huffman Nov 05 '09 at 12:14
  • Putting together an answer/ code sample that I think will work for you. – brad.huffman Nov 05 '09 at 12:29
  • But this is not the problem since I if there is going to be a sliding ttl, it's going to be preset in the application settings. So I will store the expirration (or creation) date along with the username to automatically login to. The question was what resource to use (i.e. registry etc.) – Shimmy Weitzhandler Nov 09 '09 at 08:55

1 Answers1

1

I think you would probably want to store in the registry and i dont think u have cookies in desktop apps.

Sabeen Malik
  • 10,816
  • 4
  • 33
  • 50