windows login info

Discussion in 'ASP General' started by dave, Oct 25, 2004.

  1. dave

    dave Guest

    Hi
    I'm writing one asp page and developing application for intranet...
    I just need to know when if anyone executes this scripts, i need to find out his windows login information (only username on which they are currently logged in)..
    I tried below code but its giving me machine name instead of username..
    <%
    Dim X
    set X = createobject("WSCRIPT.Network")
    dim U
    U=x.UserName
    Response.write "Logged In User is: " & U
    %>
    Any help would be appreciated..
    Thanx in advance...
    dave, Oct 25, 2004
    #1
    1. Advertising

  2. That script is running under the context of the IUSR account, so what you
    describe is expected. What you want to do is change your settings for the
    page, directory, application, or site to use authentication so that visitors
    to your site are authenticated.

    http://www.aspfaq.com/show.asp?id=2046
    I'd also post a link to a page on iisfaq.com, but I'm unable to load that
    site at the moment. Search for "authentication methods" there though too
    for more info.

    Ray at home


    "dave" <> wrote in message
    news:...
    Hi
    I'm writing one asp page and developing application for intranet...
    I just need to know when if anyone executes this scripts, i need to find out
    his windows login information (only username on which they are currently
    logged in)..
    I tried below code but its giving me machine name instead of username..
    <%
    Dim X
    set X = createobject("WSCRIPT.Network")
    dim U
    U=x.UserName
    Response.write "Logged In User is: " & U
    %>
    Any help would be appreciated..
    Thanx in advance...
    Ray Costanzo [MVP], Oct 25, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vasanth
    Replies:
    0
    Views:
    529
    Vasanth
    Jun 28, 2004
  2. Andrea Williams

    Clear the Render info & change to different info

    Andrea Williams, Oct 27, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,398
    Ken Dopierala Jr.
    Oct 27, 2004
  3. Kiran
    Replies:
    0
    Views:
    1,205
    Kiran
    Feb 6, 2005
  4. ilya

    get CPU info, RAM info

    ilya, Apr 8, 2010, in forum: Java
    Replies:
    43
    Views:
    5,928
    Mike Schilling
    Apr 19, 2010
  5. Kenshin
    Replies:
    1
    Views:
    210
    Jeff Cochran
    Jun 25, 2004
Loading...

Share This Page