The roles that you are assigning to the constructor for the
GenericPrincipal instance are valid for the lifetime of the GenericPrincipal
instance.
It all depends on what you are doing with the GenericPrincipal instance
you are constructing, and where you are holding a reference to it. If you
store it in the session, then it will last for the session, if you use it
only during the processing of a page, it will only last for the processing
of the page.
Why are you not using one of the custom membership providers for
ASP.NET? It would probably make what you are doing MUCH easier.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"DotNetNewbie" <sn***********@yahoo.comwrote in message
news:dd**********************************@e23g2000 prf.googlegroups.com...
Hi,
When adding roles to the GenericPrincipal, is this a per request
object or is it in session?
In my global.asax.cs , which event should I be adding the roles to the
GenericPrincipal?