In the global.asax file for Application_AuthenticationRequest, I set Thread.CurrentPrincipal for the custom principal. I also install HttpContext.Current.User to the same main.
However, later in the application, when I need to apply Thread.CurrentPrincipal to our custom type, I get a runtime error: Unable to pass an object of type "System.Web.Security.RolePrincipal" to enter "OurCustomPrincipal".
How Thread.CurrentPrincipal got a reset value for RolePrincipal, and moreover, how can I save it in CustomPrincipal, which we set in global.asax
Thanks in advance
asp.net-membership
Ralph shillington
source share