Getting the user's logon name and computer name 
Author Message
 Getting the user's logon name and computer name

I need to get the user's logon name (that he used to logon to windows or the
network) and his computer name (not ip address) when he comes to an asp
page.

Can this be done with VBScript?

--
Robert Dufour, MCP, MCT
President SGI IMS Inc.
www.sgiims.com



Mon, 10 Feb 2003 03:00:00 GMT  
 Getting the user's logon name and computer name
In ASP, the userID can be found in the ServerVariables collection:

userID = Request.ServerVariables("LOGON_USER")

If the website has anonymous authentication, it will not work, so you will
first need to force authentication through code.
As for the computer name, I don't know.

You can view all server variables by creating an ASP with the following
code:


<HTML>
<BODY>

<%
for each id in Request.ServerVariables
  response.write id & " = >" & Request.ServerVariables(id)  & "<br>"
next
%>

</BODY>
</HTML>


Quote:
> I need to get the user's logon name (that he used to logon to windows or
the
> network) and his computer name (not ip address) when he comes to an asp
> page.

> Can this be done with vbscript?

> --
> Robert Dufour, MCP, MCT
> President SGI IMS Inc.
> www.sgiims.com



Mon, 10 Feb 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Getting name of the user's computer

2. Getting the name of user's computer

3. Getting the name of users computer

4. Getting WinNT logon names and user groups

5. Getting user name during NT logon

6. LDB Viewer -- Need to get NT user login name in addition to computer name

7. NEWBIE - How to get computer name or user name

8. User name form computer name ??

9. Computer Name and User Name

10. Getting User and Computer Names

11. getting user rights and computer name

12. Getting the user name for a networked computer

 

 
Powered by phpBB® Forum Software