CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2001
    Location
    Singapore
    Posts
    5

    Unhappy How to capture user name/id from PC

    Let's say I am a user and have logged to the network. How do I capture user name from the pc using vbScipt (Asp environment).

    I am creating a form for people to submit their request of change in clinics. I need to capture their username from their PC as a precaution and also from breaching against the company law.

    Thank you .... and please help.

  2. #2
    Join Date
    Apr 2001
    Location
    Salt Lake City, UT
    Posts
    135
    Assuming you are using IIS 5.0,

    1. Turn on "Integrated Windows Authentication" in the IIS Options (if it is not already on)

    2. In your ASP Script, use

    UserName = Request.ServerVariables("REMOTE_USER")

    If your Windows accounts are setup with domains (e.g. windowsgroup1\cguru), you will need to parse the return value to exclude the domain name.

    That should be it. If you have a different setup or have problems, let me know and I will see what I can do to help!
    Last edited by goddess_spanky; July 31st, 2002 at 09:22 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured