Have now tried below options and sill cannot get the log on user id in IIS 7.0
Code:
If InStr(1, UCase(Request.ServerVariables("LOGON_USER")), "\") > 0 Then
Dim Splits() As String = UCase(Request.ServerVariables("LOGON_USER")).Split("\"c)
Session("@User_Id") = Splits(1) 'this will be second part
End If
Code:
If InStr(1, UCase(System.Security.Principal.WindowsIdentity.GetCurrent().Name), "\") > 0 Then
Dim Splits() As String = UCase(System.Security.Principal.WindowsIdentity.GetCurrent().Name).Split("\"c)
Session("@User_Id") = Splits(1) 'this will be second part
End If
Code:
If InStr(1, UCase(HttpContext.Current.User.Identity.Name), "\") > 0 Then
Dim Splits() As String = UCase(HttpContext.Current.User.Identity.Name).Split("\"c)
Session("@User_Id") = Splits(1)
End If
Code:
If InStr(1, UCase(Request.ServerVariables("REMOTE_USER")), "\") > 0 Then
Dim Splits() As String = UCase(Request.ServerVariables("LOGON_USER")).Split("\"c)
Session("@User_Id") = Splits(1) 'this will be second part
End If
Code:
If InStr(1, UCase(Request.ServerVariables("AUTH_USER")), "\") > 0 Then
Dim Splits() As String = UCase(Request.ServerVariables("LOGON_USER")).Split("\"c)
Session("@User_Id") = Splits(1) 'this will be second part
End If
Code:
If InStr(1, UCase(Request.ServerVariables("UNMAPPED_REMOTE_USER")), "\") > 0 Then
Dim Splits() As String = UCase(Request.ServerVariables("LOGON_USER")).Split("\"c)
Session("@User_Id") = Splits(1) 'this will be second part
End If
My pool is set to
Anonymous Authenticatio = Disabled
Windows Authentication - Enabled
Managed Pipeline Mode = Integrated
.Net Authorization Rules = Allow All Usres
Application:
<authentication mode="Windows"/>
Any suggestions where to look or what to try??? Thank you all.