Home All Groups Group Topic Archive Search About

How can I get Windows user, password and domain?

Author
14 Jun 2006 7:23 AM
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

Author
14 Jun 2006 7:43 AM
Göran_Andersson
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.


Marc Solé wrote:
Show quoteHide quote
> 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
>
>
Author
14 Jun 2006 7:53 AM
Marc Solé
Thanks Göran, but how can I access to the server variables?
Do you have a little example?

Thanks

Marc


Show quoteHide quote
"Göran Andersson" <gu***@guffa.com> wrote in message
news:eVeu3Y4jGHA.4104@TK2MSFTNGP04.phx.gbl...
> 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.
>
>
> Marc Solé wrote:
> > 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
> >
> >
Author
14 Jun 2006 4:55 PM
Göran_Andersson
Example:

userName = Request.ServerVariables("AUTH_USER")

Marc Solé wrote:
Show quoteHide quote
> Thanks Göran, but how can I access to the server variables?
> Do you have a little example?
>
> Thanks
>
> Marc
>
>
> "Göran Andersson" <gu***@guffa.com> wrote in message
> news:eVeu3Y4jGHA.4104@TK2MSFTNGP04.phx.gbl...
>> 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.
>>
>>
>> Marc Solé wrote:
>>> 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
>>>
>>>
>
>
Author
15 Jun 2006 8:53 AM
Marc Solé
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

Show quoteHide quote
"Göran Andersson" <gu***@guffa.com> wrote in message
news:%232O5qN9jGHA.3572@TK2MSFTNGP04.phx.gbl...
> Example:
>
> userName = Request.ServerVariables("AUTH_USER")
>
> Marc Solé wrote:
> > Thanks Göran, but how can I access to the server variables?
> > Do you have a little example?
> >
> > Thanks
> >
> > Marc
> >
> >
> > "Göran Andersson" <gu***@guffa.com> wrote in message
> > news:eVeu3Y4jGHA.4104@TK2MSFTNGP04.phx.gbl...
> >> 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.
> >>
> >>
> >> Marc Solé wrote:
> >>> 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
> >>>
> >>>
> >
> >
Author
15 Jun 2006 10:47 AM
Göran_Andersson
As I said before, the password is only available if basic authentication
is used. Otherwise you can't get the password.

Marc Solé wrote:
Show quoteHide quote
> 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
>
> "Göran Andersson" <gu***@guffa.com> wrote in message
> news:%232O5qN9jGHA.3572@TK2MSFTNGP04.phx.gbl...
>> Example:
>>
>> userName = Request.ServerVariables("AUTH_USER")
>>
>> Marc Solé wrote:
>>> Thanks Göran, but how can I access to the server variables?
>>> Do you have a little example?
>>>
>>> Thanks
>>>
>>> Marc
>>>
>>>
>>> "Göran Andersson" <gu***@guffa.com> wrote in message
>>> news:eVeu3Y4jGHA.4104@TK2MSFTNGP04.phx.gbl...
>>>> 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.
>>>>
>>>>
>>>> Marc Solé wrote:
>>>>> 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
>>>>>
>>>>>
>>>
>
>
Author
15 Jun 2006 1:30 PM
Marc Solé
OK, thanks a lot Göran for your help.

Marc


Show quoteHide quote
"Göran Andersson" <gu***@guffa.com> wrote in message
news:OcENskGkGHA.5036@TK2MSFTNGP04.phx.gbl...
> As I said before, the password is only available if basic authentication
> is used. Otherwise you can't get the password.
>
> Marc Solé wrote:
> > 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
> >
> > "Göran Andersson" <gu***@guffa.com> wrote in message
> > news:%232O5qN9jGHA.3572@TK2MSFTNGP04.phx.gbl...
> >> Example:
> >>
> >> userName = Request.ServerVariables("AUTH_USER")
> >>
> >> Marc Solé wrote:
> >>> Thanks Göran, but how can I access to the server variables?
> >>> Do you have a little example?
> >>>
> >>> Thanks
> >>>
> >>> Marc
> >>>
> >>>
> >>> "Göran Andersson" <gu***@guffa.com> wrote in message
> >>> news:eVeu3Y4jGHA.4104@TK2MSFTNGP04.phx.gbl...
> >>>> 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.
> >>>>
> >>>>
> >>>> Marc Solé wrote:
> >>>>> 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
> >>>>>
> >>>>>
> >>>
> >
> >
Author
14 Jun 2006 8:24 AM
Cor Ligthert [MVP]
Marc,

I never used it, but I thought that this is the one.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemnetnetworkcredentialclasstopic.asp

I hope this helps,

Cor

Show quoteHide quote
"Marc Solé" <ms***@emdep.com> schreef in bericht
news:udjl0N4jGHA.4512@TK2MSFTNGP04.phx.gbl...
> 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
>
>