According to my book, if role management is enabled, it RoleManagerModulecreates a user security context by assigning RolePrincipalan object HttpRequest.User. But a security context has already been created (thus the main object is assigned HttpContext.User) on FormsAuthenticationModulewhich is called before RoleManagerModule, which is called?
I ask this because in the following code the main object assigned HttpRequest.Useralready exists, although it RoleManagerModulehas not yet been called:
protected void Application_AuthenticateRequest(Object sender, EventArgs e)
{
if (User.Identity.IsAuthenticated && Roles.Enabled)
{
}
}
So, the main object created FormsAuthenticationModuleand assigned HttpRequest.User, later replaced by the object RolePrincipal(created RoleManagerModule)?