Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Internet & the Web (https://www.askmehelpdesk.com/forumdisplay.php?f=177)
-   -   Get the Client login name? (https://www.askmehelpdesk.com/showthread.php?t=11820)

  • Aug 15, 2005, 12:16 AM
    jenagan
    Get the Client login name?
    Dear all,

    I need to get the Client system login name to display in each client pages..
    I have tried following code it display nothing.. :(

    You are <%=Request.ServerVariables("LOGON_USER")%>

    Please anybody suggest right idea to solve this problem..

    jena.
  • Aug 15, 2005, 04:22 AM
    LTheobald
    From 4GuysFromRolla (link):
    Quote:

    Here is the answer:

    Try Request.ServerVariables("LOGON_USER").

    And this is exactly what you should do. If you turn on the directory security through the IIS Administration Console, user's will be prompted to enter their username and password (you must have the clear text option selected if you want to make it Netsca pe compatible. You can also select the NT Challenge / Response, which will work with Internet Explorer). Once they enter their name and password, it will check to see if the user has an NT account on the webserver, and if they've entered the correct pas sword. Once they are validated, you can view who they are, exactly, using Request.ServerVariables("LOGON_USER").
    Have you turned on the directory security? Are you getting a popup asking for the user's name and password? That line on it's own will not retrieve their login name that they use to access the PC.
  • Aug 15, 2005, 10:19 PM
    jenagan
    It works, but problem in validate the U,name a & Password
    Thank you V.Much LTheobald,

    It worked after did that changes.. but still I have problem,
    I'm working with Windows XP, IIS version 5.1.
    When I run this in a client mechine it took the login name as what I entered in the popup, and its not checking the password ever.

    I actually need to validate with each PC their own login username and password.. is that possibe? Or do I need to have any domin login? Or Windows server is required?
  • Aug 16, 2005, 04:06 AM
    LTheobald
    If you want the password, use Request.ServerVariables("LOGON_PASSWORD")

    I'm sure it is possible to validate a user's details against their domain but I've never done it using ASP. Try searching Google for something like "ASP user validate domain". Also check out this link - http://www.aspin.com/home/tutorial/usermanage. Hopefully you will be able to find something in there.

    Sorry I can't give you something miore useful.

  • All times are GMT -7. The time now is 07:04 PM.