Reputation: 5545
My Windows application GUI is accepting some required application configuration fields from the user. I need to store them of course, but I wanna hide these fields from the user.
Any suggestions, Where and in which format i should store fields. (Field example is: Accepting database User credentials, Task Schedule info etc.)
Upvotes: 1
Views: 185
Reputation: 30656
I would use an XML file (encrypt if you feel its necessary) and use
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
to store it in the %AppData%
section of the user's file system.
Additionally, you may write a Settings class which you serialize to disk and deserialize to memory -- this could save you some persistance logic with the XML namespace.
Upvotes: 1
Reputation: 5254
These are possible: (but crazy and bad ideas): 1. Registry 2. Create your own custom settings file 3. Encrypt them 4. Write a web service api and store them on a web server
Upvotes: 1
Reputation: 14213
It's called The Windows Registry. I hate to recommend the use of it, but I think that it fits your requirement and its use quite ubiquitous.
Upvotes: 0
Reputation: 1107
Encrypt the details to an XML file?
Use rijndael encryption that you can decrypt when you need it.
Upvotes: 0
Reputation: 53729
You can always write your own XML file and use the .NET cryptography classes to encrypt the data.
http://msdn.microsoft.com/en-us/library/ms229749.aspx
Upvotes: 0