Basically what I needed to do was manipulate the Authentication Cookie to
stuff some user-related data in it, specifically the user role.
Everything works great, except one small thing. I provide a "remember me"
checkbox on login. When I create the auth cookie during login, I set the
FormsAuthenticationTicket to persist based on the value of the checked check
box. When I redirect away from the login page, I also do this.
Response.Redirect(
FormsAuthentication.GetRedirectUrl(txtUserName.Value.Trim(),
chkPersist.Checked),
true);
The "remember me" feature doesn't work ever since I manipulated the
Application_AuthenticateRequest to decrypt the authentication cookie and
create a GenericPrincipal.
Any ideas? Thanks!