Last post Jan 29, 2015 03:51 AM by AidyF
Jan 22, 2015 08:02 AM|moreirawebmaster|LINK
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!
Jan 22, 2015 08:17 AM|AidyF|LINK
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.
Jan 28, 2015 07:50 PM|moreirawebmaster|LINK
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.
Jan 29, 2015 03:51 AM|AidyF|LINK
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.