469,963 Members | 1,210 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,963 developers. It's quick & easy.

Storing a user's password

I'm writing a program for a college to use to allow students to register their computers for use on the network. Aside from a bunch of security related checks I would like the program to offer to store the users network username and password so when they access network servers they are not prompted for their username every time. I can do it manually through the user accounts control panel -> Advanced Tab -> "Manage Passwords" button, but obviously that doesnt' work from within a C# program. Is there any way I can do this automatically?
Nov 16 '05 #1
4 1856
Ask them for it once and then put them in isolated storage.

Look at the docs for System.IO.IsolatedStorage, particularly
<ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpguide/html/cpconusingisola
tedstorage.htm>

(watch for the link break)

But there's no way to actually obtain the user's password unless he/she
gives it to you.

--
Klaus H. Probst, MVP
http://www.vbbox.com/
"Jefferson Cowart" <Jefferson Co****@discussions.microsoft.com> wrote in
message news:1B**********************************@microsof t.com...
I'm writing a program for a college to use to allow students to register

their computers for use on the network. Aside from a bunch of security
related checks I would like the program to offer to store the users network
username and password so when they access network servers they are not
prompted for their username every time. I can do it manually through the
user accounts control panel -> Advanced Tab -> "Manage Passwords" button,
but obviously that doesnt' work from within a C# program. Is there any way I
can do this automatically?
Nov 16 '05 #2
That gets me part way there. It will let me store the password securely within the program. However I want to store it into windows so the user can later type in \\server\share and connect to the network server without having to type in a username and password.

"Klaus H. Probst" wrote:
Ask them for it once and then put them in isolated storage.

Look at the docs for System.IO.IsolatedStorage, particularly
<ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpguide/html/cpconusingisola
tedstorage.htm>

(watch for the link break)

But there's no way to actually obtain the user's password unless he/she
gives it to you.

--
Klaus H. Probst, MVP
http://www.vbbox.com/
"Jefferson Cowart" <Jefferson Co****@discussions.microsoft.com> wrote in
message news:1B**********************************@microsof t.com...
I'm writing a program for a college to use to allow students to register

their computers for use on the network. Aside from a bunch of security
related checks I would like the program to offer to store the users network
username and password so when they access network servers they are not
prompted for their username every time. I can do it manually through the
user accounts control panel -> Advanced Tab -> "Manage Passwords" button,
but obviously that doesnt' work from within a C# program. Is there any way I
can do this automatically?

Nov 16 '05 #3
I am prompting the user for the password. What i'm looking for is a way to store that in the same place that the user accounts control panel stores network passwords. This way for all future connections to network servers on the domain their password will be saved.

"Klaus H. Probst" wrote:
Ask them for it once and then put them in isolated storage.

Look at the docs for System.IO.IsolatedStorage, particularly
<ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpguide/html/cpconusingisola
tedstorage.htm>

(watch for the link break)

But there's no way to actually obtain the user's password unless he/she
gives it to you.

--
Klaus H. Probst, MVP
http://www.vbbox.com/
"Jefferson Cowart" <Jefferson Co****@discussions.microsoft.com> wrote in
message news:1B**********************************@microsof t.com...
I'm writing a program for a college to use to allow students to register

their computers for use on the network. Aside from a bunch of security
related checks I would like the program to offer to store the users network
username and password so when they access network servers they are not
prompted for their username every time. I can do it manually through the
user accounts control panel -> Advanced Tab -> "Manage Passwords" button,
but obviously that doesnt' work from within a C# program. Is there any way I
can do this automatically?

Nov 16 '05 #4
I'd think that is going to be hard. I know the OS can cache credentials for
LAN access in certain cases (certainly in my home network there are shares I
don't need to authenticate against more than once), but I don't know if
that's exposed through an API or something like that.
--
Klaus H. Probst, MVP
http://www.vbbox.com/
"Jefferson Cowart" <Je*************@discussions.microsoft.com> wrote in
message news:3B**********************************@microsof t.com...
I am prompting the user for the password. What i'm looking for is a way to store that in the same place that the user accounts control panel stores
network passwords. This way for all future connections to network servers on
the domain their password will be saved.
"Klaus H. Probst" wrote:
Ask them for it once and then put them in isolated storage.

Look at the docs for System.IO.IsolatedStorage, particularly
<ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpguide/html/cpconusingisola tedstorage.htm>

(watch for the link break)

But there's no way to actually obtain the user's password unless he/she
gives it to you.

--
Klaus H. Probst, MVP
http://www.vbbox.com/
"Jefferson Cowart" <Jefferson Co****@discussions.microsoft.com> wrote in
message news:1B**********************************@microsof t.com...
I'm writing a program for a college to use to allow students to
register their computers for use on the network. Aside from a bunch of security
related checks I would like the program to offer to store the users network username and password so when they access network servers they are not
prompted for their username every time. I can do it manually through the
user accounts control panel -> Advanced Tab -> "Manage Passwords" button, but obviously that doesnt' work from within a C# program. Is there any way I can do this automatically?

Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Gordon Knote | last post: by
6 posts views Thread by zika | last post: by
reply views Thread by ericellsworth | last post: by
2 posts views Thread by Shyam | last post: by
5 posts views Thread by - Steve - | last post: by
4 posts views Thread by VB Programmer | last post: by
2 posts views Thread by Steve Lloyd | last post: by
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.