To get windows authenticated username
imports System.Security
Dim authUserName As String
Dim aspUserName As String
'authUserName = User.Identity.Name
'aspUserName = Principal.WindowsIdentity.GetCurrent.Name
'authUserPrincipalLabel.Text = "You are: " & authUserName
'aspPrincipalLabel.Text = "This page runs as: " & aspUserName
authUserName = User.Identity.Name
aspUserName = Principal.WindowsIdentity.GetCurrent.Name
authLbl.Text = "You are: " & authUserName
aspLbl.Text = "This page runs as: " & aspUserName
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home