0

I'm developing a POS standalone Desktop application uisng SQL Compact, C# WPF , i want to save the user name and password and some user related settings details in the local desktop .

can i use registry for this purpose ? if so please guide me how to do this.In my recent coding i used binary files (.dat or .bin ) to store the settings information. now iam trying to look for other options. XML is not secured as one can read the file easily.

Panindra
  • 303
  • 1
  • 4
  • 15
  • possible duplicate of [WPF/C#: Where should I be saving user preferences files?](http://stackoverflow.com/questions/396229/wpf-c-where-should-i-be-saving-user-preferences-files) – Gishu Dec 28 '10 at 09:30
  • The registry is really no more secure than XML - it's just a bunch of keys and values. – Wonko the Sane Dec 28 '10 at 16:37

2 Answers2

3

You Could use the windows registry for the users from the computer, if that user logs in to the computer your pos will auto log that person in to the system.

You can have the pos make a secure backup of the registry as user info is added. Now as far as adding other information to the registry it can be done but not very easy.

As a user logs into the system they become the curent user on a stand alone system. If this will go on a network domain then you should use active directory for your user information.

Stephan
  • 41,764
  • 65
  • 238
  • 329
Rich
  • 31
  • 3
0

How to access to Registry using C# you can find here. But, I'm not sure that is such a good idea - you can store data in a file - even in an XML. You can crypt the data - in that case it will not be readable to anyone.

Vladimir
  • 1,781
  • 13
  • 12
  • 1
    There is a Crypto API. More about it you can find in MSDN: http://msdn.microsoft.com/en-us/library/aa380255(v=VS.85).aspx – Vladimir Dec 28 '10 at 09:38
  • I've stored sensitive encrypted data in the registry before. It's relatively secure, because many people would never think of looking in the registry for certain types of data. Unusual programming habits can sometimes actually be good. – bbosak Feb 06 '11 at 03:39