rick101396
asked on
request.ServerVariables("LOGON_USER") doesn't work
Hi
I tried using the command :
<%=request.ServerVariables ("LOGON_US ER")%>
in my script but it only give me an empty string. Is there some variable that I must declare or create in order to display the server environment variable?
I appreciate any help to get the script to work. Thank you.
I tried using the command :
<%=request.ServerVariables
in my script but it only give me an empty string. Is there some variable that I must declare or create in order to display the server environment variable?
I appreciate any help to get the script to work. Thank you.
To use the LOGON_USER, the user must actually log in to the NT server. Therefore you would have to have a profile set up for that user. the other variables will work fine.
ie:
<%=Request.ServerVariables ("HTTp_REM OTEHOST") %>
ie:
<%=Request.ServerVariables
You can force a login on NT by removing the NT-rights for IUSR_machinename on the directories/files.
ASKER
MasseyM:
The code that I tried to execute didn't give me the user names. What I want to do is be able to get the logon user name and redirect them different web page if they proper access.
<html> <head><title>New Page </title></head>
<body>
<p>User Name: <%=request.ServerVariables ("LOGON_US ER")%> </p>
<p>Remote User: <%=request.ServerVariables ("HTTP_REM OTEHOST")% > </p>
</body>
</html>
I tried view the page with the codes (above) on both my computer and on another computer on the Intranet, but I am not getting anything for the script except empty strings. What I am running on my workstation is IIS 4 with ASP. Could it be because I am missing something?
Thanks.
The code that I tried to execute didn't give me the user names. What I want to do is be able to get the logon user name and redirect them different web page if they proper access.
<html> <head><title>New Page </title></head>
<body>
<p>User Name: <%=request.ServerVariables
<p>Remote User: <%=request.ServerVariables
</body>
</html>
I tried view the page with the codes (above) on both my computer and on another computer on the Intranet, but I am not getting anything for the script except empty strings. What I am running on my workstation is IIS 4 with ASP. Could it be because I am missing something?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks,
I think I could try to understand it from here.
I think I could try to understand it from here.
ASKER