I've searched and can't find anything about displaying domain user name on a webpage - just on authentication. My web page has a field that when the form loads, I want it to show the name of the user logged onto that computer. I does this by looking at
the domain user name logged onto that computer, and getting the name from a SQL table that equals that domain name. It works when I display in in Visual Studio 2010, but after I publish it (IIS), the name is blank. Here is my vb code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Dim windowsIdentity As System.Security.Principal.WindowsIdentity = System.Security.Principal.WindowsIdentity.GetCurrent
'Dim windowsLoginName As System.String = windowsIdentity.Name
Dim windowsLoginName As System.String = System.Security.Principal.WindowsIdentity.GetCurrent().Name
Dim split As String() = Nothing
...
Go to the complete details ...