Label1.Text = System.Security.Principal.WindowsIdentity.GetCurrent().Name
or
If User.Identity.IsAuthenticated Then Label1.Text = User.Identity.NameElse Label1.Text = "No user identity available."End If