get user's network name
Hi all,
I am using VB 2005 in a click-once app. I am trying to get the user name. I have tried My.User.Name with no luck. It returns "". I have also tried
Security.Principal.WindowsIdentity.GetCurrent.Name.ToString but get an error about the request failing.
I have also tried this with a return of "":
If
TypeOfMy.User.CurrentPrincipalIs _Security.Principal.WindowsPrincipal
Then' The application is using Windows authentication.' The name format is DOMAIN\USERNAME.Dim parts()AsString = Split(My.User.Name,"\")usrName = parts(1)
' The application is using custom authentication.Else' The application is using custom authentication.
usrName =
My.User.NameEndIfAny other ideas?
Thanks.

