Home All Groups Group Topic Archive Search About

in intranet, How can I get the userID using ASP?



Author
3 Sep 2006 11:49 AM
Kam
within the intranet, all user are required to login.
How can I get the User ID and Domain in ASP page?

Author
3 Sep 2006 4:23 PM
Slim
Request.ServerVariables("LOGON_USER")

Show quote
"Kam" <K**@discussions.microsoft.com> wrote in message
news:D5134F3B-A9B2-4905-A24F-AD5424C6B281@microsoft.com...
> within the intranet, all user are required to login.
> How can I get the User ID and Domain in ASP page?
Author
3 Sep 2006 11:38 PM
Kam
I had a problem in using it.
I setup up the IIS server with Authentication Methods = Integrated Windows
authentication.

when I use Request.ServerVariables("LOGON_USER"), the result is equal to "  
   "
The following is my code.
<HTML>
<BODY>
      You are <%=Request.ServerVariables("LOGON_USER")%>
</BODY>
</HTML>

How can I fix it? or what should I do before hand?

Show quote
"Slim" wrote:

> Request.ServerVariables("LOGON_USER")
>
> "Kam" <K**@discussions.microsoft.com> wrote in message
> news:D5134F3B-A9B2-4905-A24F-AD5424C6B281@microsoft.com...
> > within the intranet, all user are required to login.
> > How can I get the User ID and Domain in ASP page?
>
>
>
Author
4 Sep 2006 12:27 PM
Bob Barrows [MVP]
Kam wrote:
> I had a problem in using it.
> I setup up the IIS server with Authentication Methods = Integrated
> Windows authentication.
>
> when I use Request.ServerVariables("LOGON_USER"), the result is equal
>   to " "
This usually means that you forgot to uncheck the Anonymous access checkbox.
Anonymous needs to be disabled in order for this to work.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Author
4 Sep 2006 8:44 AM
Anthony Jones
"Kam" <K**@discussions.microsoft.com> wrote in message
news:D5134F3B-A9B2-4905-A24F-AD5424C6B281@microsoft.com...
> within the intranet, all user are required to login.
> How can I get the User ID and Domain in ASP page?

What do you use to perform the login?
Is anonymous access enabled?
Are you using window intergrated authentication?

AddThis Social Bookmark Button