T
Tomasz
Hello Developers!
I have an interesting problem using my custom MembershipProvider,
RoleProvider and Forms Authentication.
Both MembershipProvider and RoleProvider require session state, where some
very important context data are stored during the Session_Start event. My
MembershipProvider and RoleProvider depend on this information.
It seems that authentication process works with no problems.
However, during the later authorization phase session state is not
available!
I found that during the login process, after a user presses the "Login"
button, events occur in the following order:
1. Application_AuthenticateRequest event fires
2. Application_AcquireRequestState event fires
3. MembershipProvider.ValidateUser() gets called
4. Application_AuthenticateRequest event fires
5. RoleProvider.GetRolesForUser() gets called
For any reason, AcquireRequestState does not fire after AuthenticateRequest
event, but before RoleProvider.GetRolesForUser() method gets called.
Is there any, even tricky, way session state can be forced to restore before
authorization?
Thank you for any hints.
Tomasz
I have an interesting problem using my custom MembershipProvider,
RoleProvider and Forms Authentication.
Both MembershipProvider and RoleProvider require session state, where some
very important context data are stored during the Session_Start event. My
MembershipProvider and RoleProvider depend on this information.
It seems that authentication process works with no problems.
However, during the later authorization phase session state is not
available!
I found that during the login process, after a user presses the "Login"
button, events occur in the following order:
1. Application_AuthenticateRequest event fires
2. Application_AcquireRequestState event fires
3. MembershipProvider.ValidateUser() gets called
4. Application_AuthenticateRequest event fires
5. RoleProvider.GetRolesForUser() gets called
For any reason, AcquireRequestState does not fire after AuthenticateRequest
event, but before RoleProvider.GetRolesForUser() method gets called.
Is there any, even tricky, way session state can be forced to restore before
authorization?
Thank you for any hints.
Tomasz