Hi,
i am trying to built one login code in which, if User is registered in Active Directory then it will automatically get home page.
my problem is how can i get the UserName of Computer which is connected on server using ASPX page.???
PLz Help Me :)
How to find UserName of client on server???
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


SivaRamaKrishna Raju43 reputationPosted Jan 17, 2011, 2:03 AM EST
assuming that you're not using ASP.NET forms authentication mode,
(if you do, you can get username from session)
try using this code:
Dim userName() As String = Split(HttpContext.Current.User.Identity.Name,"\")
userName(0) '// contains Machine name or Domain name
userName(1) '// contains Username
http://www.codeproject.com/KB/asp/request_server_variables.aspx
let me know if any issues,
Thanks and Regards,
V.S.R.K.Raju..
Soft CornerRank #1,221 · 1.5K reputationPosted Jan 17, 2011, 2:48 AM EST
But HttpContext.Current.User.Identity.Name or
HttpContext.Current.Request.ServerVariables["LOGON_USER"] (as per above link) is not working after deploying project on IIS.
It will show the result of server machine only not a client side machine .. plz tell me if u knw how to do this for client side???