using System.Security;
using System.Security.Principal;
I dont have an example, but thats what you need to use. In VB world is:
Imports System.Security
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim authUserName As String
Dim aspUserName As String
authUserName = User.Identity.Name
aspUserName = Principal.WindowsIdentity.GetCurrent.Name
Label2.Text = "You are: " & authUserName
Label3.Text = "This page runs as: " & aspUserName
end s
found here http://www.dotnetspider.com/qa/Question18721.aspx
It should kind of give you an idea, but remember to use the first 2 lines in my post..