J
Jeff Deville
I'd like to create customer roles for my ASP.Net application, but I am
also using impersonation. For the purposes of this issue, say I have
the simple code below for my custom roles.:
Overrides Sub Init()
_ht = New Hashtable
_ht.Add("mycomputer/me", New String() {"ViewAll",
"ViewPublished"})
End Sub
Sub WindowsAuthentication_Authenticate(ByVal s As Object, ByVal e As
WindowsAuthenticationEventArgs)
e.User = New GenericPrincipal(e.Identity, _ht("mycomputer/me"))
End Sub
The problem is that I don't have access to the custom roles in my page
code. I've read that this has something to do w/ impersonation
happening after the WindowsAuthentication_Authenticate method is
called. The problem is that the User object seems to be read only
after this, so in what method can I assign these custom roles?
Thanks
-j
also using impersonation. For the purposes of this issue, say I have
the simple code below for my custom roles.:
Overrides Sub Init()
_ht = New Hashtable
_ht.Add("mycomputer/me", New String() {"ViewAll",
"ViewPublished"})
End Sub
Sub WindowsAuthentication_Authenticate(ByVal s As Object, ByVal e As
WindowsAuthenticationEventArgs)
e.User = New GenericPrincipal(e.Identity, _ht("mycomputer/me"))
End Sub
The problem is that I don't have access to the custom roles in my page
code. I've read that this has something to do w/ impersonation
happening after the WindowsAuthentication_Authenticate method is
called. The problem is that the User object seems to be read only
after this, so in what method can I assign these custom roles?
Thanks
-j