• Get NT login ID

    Author
    Topic
    #354647

    I’m using IIS 5.0 on my Windows 2000 Professional notebook; new to the world of scripting, but comfortable with VBA and general programming constructs.

    I’m able to write data from a form in a HTML page into an Access table with no trouble, and am able to stamp the records with Date/Time stamp. I’d also like to grab the NT user ID of the user who inputted data, but am unsure how. Not only would this be a good way to audit the input of data, but also allow a dynamic filter when the users want to query the db; I can only show them records they inputted. Anybody have a code snippet or a resource they can point me to? Thanks in advance!

    Regards,

    Viewing 0 reply threads
    Author
    Replies
    • #521439

      There’s an article on this at ">Returning the Username
      Return the Full Name of the logged in user

      Hope that helps!

      • #524629

        I was actually looking for a way to get the equivalent of an API call to get the login name of the user accessing my ASP page; I should have been more specific in my original post, and it was only after spending a week with the nice folks at AppDev that I was able to figure it out. joy

        If you’re developing on an internal, NT based web, and the virtual directory of your ASP page is set to not allow anonymous access but to use integrated Windows authentication, you can use Request.ServerVariables(“AUTH_USER”) to get the login name. The function I’m using is below; let me know if anyone has a more elegant way to go about it.
        ””””””””””’

        Untitled

        Here is the person logged into the network:

        The above derived from the below – Request.ServerVariables(“AUTH_USER”):

    Viewing 0 reply threads
    Reply To: Get NT login ID

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: