How can I get Windows user, password and domain?

  • Thread starter Thread starter Marc Solé
  • Start date Start date
M

Marc Solé

Hello all,

I have a web application that runs in a server and makes a Windows user
validation to loggin. My question is, how can I get that loggin user,
password and domanin to use it in my application?

Thanks

Marc
 
The ServerVariables collection contain the AUTH_USER value which will
tell you the user name.

The AUTH_PASSWORD value contains the password, but only if basic
authentication is used.
 
Thanks Göran, but how can I access to the server variables?
Do you have a little example?

Thanks

Marc
 
Thanks Göran, but when I do:

userPassword = Request.ServerVariables("AUTH_PASSWORD")

it is a NULL String.

Do you know what could be the problem?

Thanks

Marc
 
As I said before, the password is only available if basic authentication
is used. Otherwise you can't get the password.
 
OK, thanks a lot Göran for your help.

Marc


Göran Andersson said:
As I said before, the password is only available if basic authentication
is used. Otherwise you can't get the password.
 
Back
Top