M
Mark
Hello Friend
Please check following Cod
Dim x As System.Security.Principal.WindowsPrincipa
x = System.Threading.Thread.CurrentPrincipa
Response.Writ
(System.Security.Principal.WindowsIdentity.GetCurrent.Auth
nticationType & "<BR>"
Response.Writ
(System.Security.Principal.WindowsIdentity.GetCurrent.Name
& "<BR>"
Response.Write(x.IsInRol
(System.Security.Principal.WindowsBuiltInRole.Administrato
) & "<BR>"
Response.Write(x.IsInRol
(System.Security.Principal.WindowsBuiltInRole.User)
& "<BR>"
Response.Write(x.IsInRole("MyDomain\MyGroup")
& "<BR>"
Response.Write("<BR>----<BR>"
x = New System.Security.Principal.WindowsPrincipal (System.Security.Principal.WindowsIdentity.GetCurrent
Response.Write(System.Security.Principal.WindowsIdentity.GetCurrent.AuthenticationType & "<BR>"
Response.Write(System.Security.Principal.WindowsIdentity.GetCurrent.Name & "<BR>"
Response.Write(x.IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator) & "<BR>"
Response.Write(x.IsInRole(System.Security.Principal.WindowsBuiltInRole.User) & "<BR>"
Response.Write(x.IsInRole("MyDomain\MyGroup") & "<BR>"
The result using Basic Windows Authentication, and looged
in with a valid user name "validusername"
NTL
FUSION-PUNE\validusernam
Tru
Tru
Fals
---
NTL
FUSION-PUNE\validusernam
Tru
Tru
Fals
The result when "Anonymous Access" set in IIS
NTL
FTPUNE0025\IUSR_FTPUNE002
Fals
False***
Fals
---
NTL
FTPUNE0025\IUSR_FTPUNE002
Fals
True***
Fals
**** Why there is a difference for same user
Regard
Mark
Please check following Cod
Dim x As System.Security.Principal.WindowsPrincipa
x = System.Threading.Thread.CurrentPrincipa
Response.Writ
(System.Security.Principal.WindowsIdentity.GetCurrent.Auth
nticationType & "<BR>"
Response.Writ
(System.Security.Principal.WindowsIdentity.GetCurrent.Name
& "<BR>"
Response.Write(x.IsInRol
(System.Security.Principal.WindowsBuiltInRole.Administrato
) & "<BR>"
Response.Write(x.IsInRol
(System.Security.Principal.WindowsBuiltInRole.User)
& "<BR>"
Response.Write(x.IsInRole("MyDomain\MyGroup")
& "<BR>"
Response.Write("<BR>----<BR>"
x = New System.Security.Principal.WindowsPrincipal (System.Security.Principal.WindowsIdentity.GetCurrent
Response.Write(System.Security.Principal.WindowsIdentity.GetCurrent.AuthenticationType & "<BR>"
Response.Write(System.Security.Principal.WindowsIdentity.GetCurrent.Name & "<BR>"
Response.Write(x.IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator) & "<BR>"
Response.Write(x.IsInRole(System.Security.Principal.WindowsBuiltInRole.User) & "<BR>"
Response.Write(x.IsInRole("MyDomain\MyGroup") & "<BR>"
The result using Basic Windows Authentication, and looged
in with a valid user name "validusername"
NTL
FUSION-PUNE\validusernam
Tru
Tru
Fals
---
NTL
FUSION-PUNE\validusernam
Tru
Tru
Fals
The result when "Anonymous Access" set in IIS
NTL
FTPUNE0025\IUSR_FTPUNE002
Fals
False***
Fals
---
NTL
FTPUNE0025\IUSR_FTPUNE002
Fals
True***
Fals
**** Why there is a difference for same user
Regard
Mark