G
Guest
Hello, I implemented a classic FormsAuthentication. I created my own classes that implement ISItePrincipal and ISiteIdentity. When the login is succesfull I do something like this:
newPrincipal = new CustomSitePrincipal(.....);
this.Context.User = newPrincipal;
FormsAuthetication.SetAuthCookie(...);
Response.Redirect("\Default.aspx");
In default.aspx all works fine, the Context.User.Identity.IsAuthenticated is true, but, the Context.User is no longer of CustomSitePrincipal type, instead it is a default FormssomethingPrincipal. Why does my context loose the SitePrincipal?? I need to persist it in this way so I can pull some information from it and display it on the page...
PS: I know this should work as I saw it work before, I just don't know what I am missing....
Any ideas?
Thank you,
Andrew.
newPrincipal = new CustomSitePrincipal(.....);
this.Context.User = newPrincipal;
FormsAuthetication.SetAuthCookie(...);
Response.Redirect("\Default.aspx");
In default.aspx all works fine, the Context.User.Identity.IsAuthenticated is true, but, the Context.User is no longer of CustomSitePrincipal type, instead it is a default FormssomethingPrincipal. Why does my context loose the SitePrincipal?? I need to persist it in this way so I can pull some information from it and display it on the page...
PS: I know this should work as I saw it work before, I just don't know what I am missing....
Any ideas?
Thank you,
Andrew.