locked
Get the logged in user in windows on the client RRS feed

  • Question

  • User1091484614 posted

    Hello everyone.

    I wonder how do I get the user logged on the client windows before authenticate via WINDOWS need before making some validations for only then authenticate.

    I have a asp.net mvc project 4 and yet I used the following tips:

    Request.ServerVariables ["LOGON_USER"] - takes the user logged on my system (not used)

    System.Web.HttpContext.Current.Request.LogonUserIdentity.Name - takes the user of the machine with domain, but after publishing the site in IIS redbourn the field and IIS User (not used)


    The need is in the production environment the user that should be noted is the client rather than the server.

    Sorry for my bad English!

    Thank U.

    Thursday, January 22, 2015 8:02 AM

Answers

  • User-760709272 posted

    You can only get the user's windows username if you are using Windows Authentication.  Without that the browser doesn't send the credentials for you to be able to access them.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 29, 2015 3:51 AM

All replies

  • User-760709272 posted

    You can only get the Window username of the user if you are using Windows Authentication.  Google for how to enable Windows Authentication, but note that it might not be viable, it is normally only used for intranet sites, it won't work over the internet.

    Thursday, January 22, 2015 8:17 AM
  • User1091484614 posted

    Thanks for the reply.

    Well if I'm asking this kind of question is why my system is intranet.

    The problem is that in all cases before validating and log the User next to my site I need to have this network User authentication before to create some logs and look for some files in network with that name User.

    Get the idea?

    Thank you very much.

    Wednesday, January 28, 2015 7:50 PM
  • User-760709272 posted

    You can only get the user's windows username if you are using Windows Authentication.  Without that the browser doesn't send the credentials for you to be able to access them.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 29, 2015 3:51 AM