My.Settings problems...

Anti-Rich

Well-known member
Joined
Jul 1, 2006
Messages
325
Location
Perth, Australia
Programming Experience
1-3
Hi All,

i have a question which i hope someone can answer... i am trying to store a username and encrypted password inside the My.Settings area of my application (the Settings.vb file)... now everytime i try to access/change the setting i created (at the moment i have only created username), it spits out the error "Configuration System failed to initialize". have i forgotten to enable something in my project in order for this to initialize?

another question i have is this... i have been told that it is bad security procedure to store a password in a config file (this is obvious due to the fact that it can easily be accessed by anyone), but does this still apply if it has been encrypted? the reason i ask is because i will only ever have one sort of username/password combination for my database, and i dont know where to store it other than the config file.

if someone could clarify either one of these points (or better yet both! :)) i would be really grateful

cheers

adam
 
ok, i have solved the first part of my problem. it was due to the fact that when you are using the settings form (in the project properties) there needs to be an app.config file in there.

now, another much more frustrating problem has popped up...

basically when i save the settings in my settings form, it saves them no problem. but when i exit out of the program and re-start it the settings for some reason, have cleared comletely adn reset themselves to nothing!!

i have not reset these values anywhere in my code, so i have no clue why this is happening.

i would greatly appreciate some assistance

cheers all

regards
adam
 
Back
Top