Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Setting Up&Requesting Server Var's

jenergizerjenergizer Member Posts: 5
I am trying to request the servervariable LOGON_USER or AUTH_User on my webpage.
When the user enters the ip addy, it prompts for a domainusername and password.
From this I need to extract the DOMAIN so that I can redirect certain Domain users to different webpages.

So far:
sFullUser = Request.ServerVariables ("LOGON_USER")
is returning NOTHING for some reason and I can't seem to see why not.
I am using WIN2k Server on the webserver and IIS.
The authentication is set to no anonymous (basic and windows auth).

Any thoughts on why this is not returning anything at all when I log into the page?

Thanks!

Comments

  • lillulillu Member Posts: 308
    The following script detects that the user has connected anonymously (the LOGON_USER server variable is empty)

    <% @ language="VBscript" %>

    <%
    strLogon = Request.ServerVariables("LOGON_USER")
    If IsEmpty(strLogon) Or strLogon = "" Then
    Response.Status = "401 Access Denied"
    Response.End
    End If
    %>

    You are logged on as: <%= strLogon %>

    : I am trying to request the servervariable LOGON_USER or AUTH_User on my webpage.
    : When the user enters the ip addy, it prompts for a domainusername and password.
    : From this I need to extract the DOMAIN so that I can redirect certain Domain users to different webpages.
    :
    : So far:
    : sFullUser = Request.ServerVariables ("LOGON_USER")
    : is returning NOTHING for some reason and I can't seem to see why not.
    : I am using WIN2k Server on the webserver and IIS.
    : The authentication is set to no anonymous (basic and windows auth).
    :
    : Any thoughts on why this is not returning anything at all when I log into the page?
    :
    : Thanks!
    :
    :

    [hr][grey]To err is human, but to really foul things up requires a computer. (Farmers Almanac)[/grey] :-)

Sign In or Register to comment.