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 :)
Loading

Soft CornerPosted Jan 17, 2011, 7:48 AM
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???
SivaRamaKrishna RajuPosted Jan 17, 2011, 7:03 AM
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..