ASP.NET 2.0 - Get the Username of the currently logged in user.

How do i get the username of the user who is currently logged in to the pc in ASP.NET 2.0? I'm doing a small web forms APP and need to put the username into a Label control. The user is logged into the Windows account which is a client pc on the active directory network.
Who is Participating?
Following will give you the Username of Currently Logged In User
Dim UserName As String
        UserName = User.Identity.Name.ToString()

Full path hierarchy including the Namespace path

Forced accept.

EE Admin
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.