
Getting NT User Login Name
AUTH_USER and REMOTE_USER and LOGON_USER will be non-blank _only_ if you use
authentication. If you allow anonymous access, they will be blank.
Here's a simple ASP that will display all of the available ServerVariables
with names and values. Try it with and without authentication to see which
gives you what you need...
<HTML>
<HEAD>
<TITLE> Server Variables </TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<%
response.write "<pre>"
response.write "Request.ServerVariables<br>"
response.write "-----------------------<br>"
set vars = request.servervariables
for each var in vars
response.write var & "="&request.servervariables(var) & "<br>"
next
response.write "</pre>"
%>
</BODY>
</HTML>
--
Michael Harris
| Thanks. It seems that all other ServerVariables work for me. eg.
REMOTE_HOST
| ..etc, except for LOGON_USER which continuously give me empty string.
|
| I have ensure that i have logon to the webserver.
|
| Is there other settings that is preventing me from getting the user name?
|
| > That will work, but this will only work if the user has been
authenticated
| > by the web server.
| >
| > - Jeff
| >
| > > try this !
| > > Request.ServerVariables("LOGON_USER")
| > >
| > >
| > >
| >
| >
|
|