Hi,
I'm using Forms authentication for my web app. I've a custom Principal class that I would like to set to the HttpContext.Cur rent.User after the Membership.Vali dateUser() passes. I'm able to set the value in the login form, however when FormsAuthentica tion.RedirectFr omLoginPage() redirects the call to my Default.aspx the HttpContext.Cur rent.User has a completely different value.
Within the ValidateUser() I'm constructing my custom principal object and storing it in HttpContext.Cur rent.Applicatio nInstance.Sessi on. I've tried setting the HttpContext.Cur rent.User in the Application_Pos tAuthenticateRe quest but it fails saying HttpContext.Cur rent.Applicatio nInstance.Sessi on is not a valid property.
How do I set the HttpContext.Cur rent.User and keep it throughout the application?
Thank you.
Bala
I'm using Forms authentication for my web app. I've a custom Principal class that I would like to set to the HttpContext.Cur rent.User after the Membership.Vali dateUser() passes. I'm able to set the value in the login form, however when FormsAuthentica tion.RedirectFr omLoginPage() redirects the call to my Default.aspx the HttpContext.Cur rent.User has a completely different value.
Within the ValidateUser() I'm constructing my custom principal object and storing it in HttpContext.Cur rent.Applicatio nInstance.Sessi on. I've tried setting the HttpContext.Cur rent.User in the Application_Pos tAuthenticateRe quest but it fails saying HttpContext.Cur rent.Applicatio nInstance.Sessi on is not a valid property.
How do I set the HttpContext.Cur rent.User and keep it throughout the application?
Thank you.
Bala
Comment