Tuesday, July 28, 2009

Is there a way to find out the username of computer from which a request came to IIS using asp.net?

{This is an intranet site and not internet facing}





I want to process the request and find out the user who logged in {into the windows}. Using this information, I want to process the request. Is there any easier way to find it out?





Request.LogonUserIdentity.Name doesn't work in my case.

Is there a way to find out the username of computer from which a request came to IIS using asp.net?
this article might help you:





http://www.codeproject.com/useritems/How...
Reply:Thanks a lot. This was a superb link exactly addressing my requirement. Report It

Reply:I was planning on doing the same thing for a web page I was designing for our local intranet, but I quickly found out that not a single browser I tested actually sends the username, they just leave it blank.





So, unfortunately, this does not work.





If you really need it, the only way I can see it happening is grabbing the IP address from the request and doing a reverse-lookup to get the computer name. (It wont give you the logged on user, but thats close). If you absolutely have to have the logged in user you could probably do SMB requests of some sort, but that would seriously be a ton of work just to TRY it, and even then it might not work.

state flower

No comments:

Post a Comment