Thank you for the informative post.
However, something still isn't correct because when I try the following code
in page_load, I still get "Not in Role" even though I know for a fact that
I'm in the shown Security Group. I've tried both sides, a group I'm in and a
group I'm not in and I get the same result.
Response.Write(User.Identity.Name)
Dim wp As New
System.Security.Principal.WindowsPrincipal(System.Security.Principal.WindowsIdentity.GetCurrent())
If wp.IsInRole("domain01\CSS Users") Then
Response.Write("In Role")
Else
Response.Write("Not in Role")
End If
Also, the intent of my original post was to perform authentication using
nothing but the "role" attribute from the web.config and not custom code.
What if I wanted to add another role to access the web application? using
this method I'd need to recompile, with the web.config, it's a simply change,
no recompile or re-install.