Context.User
After successfull validation on my Login.aspx page I execute the following code:-
Context.User = newUser;
FormsAuthentication.SetAuthCookie( SSN.Text, true );
In my Web.Config file I have following configuration :-
<authentication mode="Forms">
<forms name="PayDayLoanWebsite" path="/"
loginUrl="/PayDayLoanWebsite/Modules/Accounts/Login/Login.aspx"
protection="All" timeout="30">
</forms>
</authentication>
But when I go to the next page, MyAccount.aspx, the Context.User.GetType() returns me "System.Security.Principal.GenericPrincipal" in my application where as in ThePhile it returns "Wrox.WebModules.Accounts.Business.PhilePrincipal" ; which is what I want. Somehow I am loosing the context between the pages.
Please help me with this problem, I've spent enough hours on this and not able to solve it.
Thank you.
Niketu
|