Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
26794 Points
4436 Posts
Apr 13, 2012 03:13 PM|LINK
The Session may not be migrating across the two areas - and the Redirect could be the culprit.
Bertrand Le Roy discusses this same topic in his blog and why not to use Redirects after manipulating the Session:
Bertrand Le Roy : Don't Redirect After Session Variable Changes
He presents two solutions - the first, which applies to FormsAuthentication, uses an already predefined to handle this very purpose:
FormsAuthentication.RedirectFromLoginPage("/Order")
The other solution is to overload the original version of the Redirect method, by passing false as the second parameter:
Request.Redirect("/Order",false);
Rion William...
All-Star
26794 Points
4436 Posts
Re: Session variable login lost
Apr 13, 2012 03:13 PM|LINK
The Session may not be migrating across the two areas - and the Redirect could be the culprit.
Bertrand Le Roy discusses this same topic in his blog and why not to use Redirects after manipulating the Session:
Bertrand Le Roy : Don't Redirect After Session Variable Changes
He presents two solutions - the first, which applies to FormsAuthentication, uses an already predefined to handle this very purpose:
FormsAuthentication.RedirectFromLoginPage("/Order")The other solution is to overload the original version of the Redirect method, by passing false as the second parameter:
Request.Redirect("/Order",false);