By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,033 Members | 1,285 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,033 IT Pros & Developers. It's quick & easy.

storing login, password and server name in the registry

P: n/a
Sam
Hi,
I'd like to create a form for my user to enter login information. This
information should be stored somewhere, best way I guess is the
registry. Then if a user attempt to login on the same machine later on,
the form will be filled in automatically from the registry.

Is it possible ? How can I do that ? I don't know how to access the
registry ?

Thx

Nov 21 '05 #1
Share this Question
Share on Google+
14 Replies


P: n/a
Sam,

Yes this is easily posible but strongly recomended not to do.

The most "easy" and in my opinio best way to do this is to use the principal
namespace
http://msdn.microsoft.com/library/de...yprincipal.asp

Never store user passwords in your registry, if you cannot do the above than
you can get the user with

Environment.username

I hope this helps,

Cor
Nov 21 '05 #2

P: n/a
Sam
my mistake, I do NOT intend to store the password. However I intend to
store other information, so I understand I can get the username with
Environment.username, but then how do I store my txtboxes values in the
registry ?

thx

Nov 21 '05 #3

P: n/a
Sam,

Very very simple by using this class.
http://msdn.microsoft.com/library/de...ClassTopic.asp

I hope this helps,

cor
Nov 21 '05 #4

P: n/a
Sam
Cor,
Could you send the link again ? I'm not authorized to view this page,
it must belong to your session or something !

Thx

Nov 21 '05 #5

P: n/a
Sam
Actually, would that be better to store this information in a XML file
instead ?

Nov 21 '05 #6

P: n/a
http://www.kjmsolutions.com/xmlsettings.htm

"Sam" <sa**************@voila.fr> wrote in message
news:sa**************@voila.fr:
Actually, would that be better to store this information in a XML file
instead ?


Nov 21 '05 #7

P: n/a
Sam,

Storing information about the configuration as the last settings from the
screen is for me the registry. Setting information about the application is
for me an xml.file

I hope this gives ideas

The link is a complete open link to msdn.microft.com

Cor
Nov 21 '05 #8

P: n/a
Kelly,

Can you try that link to MSDN in my message?

Cor
Nov 21 '05 #9

P: n/a
Sam
scorpion53061,
I like that, it's more what I'd like to do. However, how can I set the
XML file to be specific to each user. If it's shared by everyone, it's
not gonna work.

Regards

Nov 21 '05 #10

P: n/a

If you are referring to the registry link yes it came up when I clicked
on it.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:no************@planet.nl:
Kelly,

Can you try that link to MSDN in my message?

Cor


Nov 21 '05 #11

P: n/a

Create a XML file for each user. When a new user wants to use the
program it should create the XML file specific to them.
"Sam" <sa**************@voila.fr> wrote in message
news:sa**************@voila.fr:
scorpion53061,
I like that, it's more what I'd like to do. However, how can I set the
XML file to be specific to each user. If it's shared by everyone, it's
not gonna work.

Regards


Nov 21 '05 #12

P: n/a
Sam
Actually I found a better way: Isolated Storage :)

Nov 21 '05 #13

P: n/a

Just be careful Sam. Isolated Storage is great but you are going to have
to ask your users to adjust security settings in the Framework to make
it work.

"Sam" <sa**************@voila.fr> wrote in message
news:sa**************@voila.fr:
Actually I found a better way: Isolated Storage :)


Nov 21 '05 #14

P: n/a
Sam
!
What kind of security settings ? That's very important ! Would that be
the same kind as the registry ?

Nov 21 '05 #15

This discussion thread is closed

Replies have been disabled for this discussion.