P
popman
I'd like to use role in Forms authentication and I found the following words
from .net SDK about ASP.NET Authorization.
" Identifies a targeted role for this element. The associated IPrincipal
object for the request determines the role membership. You can attach
arbitrary IPrincipal objects to the context for a given request and they can
determine role membership in whatever way you like."
And I have the following codes:
Dim ui As New System.Security.Principal.GenericIdentity("popman")
Dim roles() As String = {"admin"}
Dim urole As New System.Security.Principal.GenericPrincipal(ui,
roles)
My questions is
1. what is "the context for a given request" ?
2. where is "the context for a given request" ?
3. How to attach urole to the context?
Thanks.
Thanks.
from .net SDK about ASP.NET Authorization.
" Identifies a targeted role for this element. The associated IPrincipal
object for the request determines the role membership. You can attach
arbitrary IPrincipal objects to the context for a given request and they can
determine role membership in whatever way you like."
And I have the following codes:
Dim ui As New System.Security.Principal.GenericIdentity("popman")
Dim roles() As String = {"admin"}
Dim urole As New System.Security.Principal.GenericPrincipal(ui,
roles)
My questions is
1. what is "the context for a given request" ?
2. where is "the context for a given request" ?
3. How to attach urole to the context?
Thanks.
Thanks.