Abdu_Allah
asked on
Why Request.ServerVariables("LOGON_NAME") is empty!
Hi, I authenticated our web page through NTLM but when I try to retrieve Request.ServerVariables("L OGON_NAME" ) it is empty, IIS is confugured correctly and anonymous login is disabled.
Did I miss something? Why Request.ServerVariables("L OGON_NAME" ) is empty!
Please help.
Did I miss something? Why Request.ServerVariables("L
Please help.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Here is some of what your code printed out:
.
.
.
LOGON_USER - administrator
REMOTE_ADDR - 127.0.0.1
REMOTE_HOST - 127.0.0.1
REMOTE_USER - administrator
.
.
.
.
.
.
LOGON_USER - administrator
REMOTE_ADDR - 127.0.0.1
REMOTE_HOST - 127.0.0.1
REMOTE_USER - administrator
.
.
.
that is very interesting! lets try directly writing on _your_ page without assigning the value to a variable.
so your code:
DomainAndUser = Request.ServerVariables("L OGON_NAME" )
response.write DomainAndUser
change to:
response.write Request.ServerVariables("L OGON_NAME" ) & "<br>"
DomainAndUser = Request.ServerVariables("L OGON_NAME" )
response.write DomainAndUser
so your code:
DomainAndUser = Request.ServerVariables("L
response.write DomainAndUser
change to:
response.write Request.ServerVariables("L
DomainAndUser = Request.ServerVariables("L
response.write DomainAndUser
ASKER
Actually I found th reason it is with: LOGON_USER and not LOGON_NAME !!
ASKER
Why there is no LOGON_NAME variable here! my server is Win 2003 server!
good catch. i dont think there is name on 2000 either.
ASKER
Actually darkeryu wrote it but I did not see it.
Well, I need to retrieve domain name if the user did not enter it in the user name edit box in this format(Domain\user name) I cannot retrieve it...how can I force the users to enter the format: Domain\user name?
Well, I need to retrieve domain name if the user did not enter it in the user name edit box in this format(Domain\user name) I cannot retrieve it...how can I force the users to enter the format: Domain\user name?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am using basic, I have changed to integrated auth and it works fine. thank you.
ASKER
Here is my code:
DomainAndUser = Request.ServerVariables("L
response.write DomainAndUser
It does not print anything!!