Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   Get System user name at WINNT and WIN2000 (http://www.velocityreviews.com/forums/t799833-get-system-user-name-at-winnt-and-win2000.html)

jay.chan@ithlgroup.com 10-18-2005 01:32 AM

Get System user name at WINNT and WIN2000
 
I am writing a web application to get System user name. By reading the
previous post, it seems that this method works

<%@ Language=VBScript %>
<%
Dim user, pword
user = Request.ServerVariables("AUTH_USER")
Response.Write user
%>

but I want to ask is it only work at WINNT? How about WIN2000 Server, I
can get nothing when use this statement on WIN2000 Server.

Besides,
If I want to use Jsp, is there any methods to achieve the same thing?

Thank you!


AlanM 10-18-2005 08:38 AM

Re: Get System user name at WINNT and WIN2000
 

<jay.chan@ithlgroup.com> wrote in message
news:1129599176.029463.98870@z14g2000cwz.googlegro ups.com...
>I am writing a web application to get System user name. By reading the
> previous post, it seems that this method works
>
> <%@ Language=VBScript %>
> <%
> Dim user, pword
> user = Request.ServerVariables("AUTH_USER")
> Response.Write user
> %>
>
> but I want to ask is it only work at WINNT? How about WIN2000 Server, I
> can get nothing when use this statement on WIN2000 Server.
>



yes it should work on any sefver that runs IIS


> Besides,
> If I want to use Jsp, is there any methods to achieve the same thing?
>
> Thank you!
>




Ray Costanzo [MVP] 10-18-2005 01:21 PM

Re: Get System user name at WINNT and WIN2000
 
You have to turn off anonymous access to the site or directory or page and
authenticate your users before you can get the auth_user variable to be
populated with a value.

Ray at work

<jay.chan@ithlgroup.com> wrote in message
news:1129599176.029463.98870@z14g2000cwz.googlegro ups.com...
>I am writing a web application to get System user name. By reading the
> previous post, it seems that this method works
>
> <%@ Language=VBScript %>
> <%
> Dim user, pword
> user = Request.ServerVariables("AUTH_USER")
> Response.Write user
> %>
>
> but I want to ask is it only work at WINNT? How about WIN2000 Server, I
> can get nothing when use this statement on WIN2000 Server.
>
> Besides,
> If I want to use Jsp, is there any methods to achieve the same thing?
>
> Thank you!
>





All times are GMT. The time now is 05:00 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.