Last post Sep 05, 2011 09:10 PM by bluesheeva
Aug 21, 2011 09:07 PM|bluesheeva|LINK
I'm heavily using HttpWebRequest in my apps. When my asp.net server receive a httpWebRequest, it uses formsAuthentication to ask the client to login himself and then redirect the page to the default.aspx. I create session objects in the login page and these
objects would need to be used in the default.aspx too. The problem is I need to maintain these session objects after the redirection and I'm not able to use FormsAuthentication.RedirectFromloginPage or Response.Redirect. I understand that both syntaxs are
able to receive a parameter that keep the page life cycle alive. I can't use these syntaxs as I need to create a response that contains a authentication cookie, then return the response back to the client browser, after that the client browser will navigate
to the default.aspx with this authenticaiton cookie. Anyone knows how to keep the sessions objects (or page life cycle) alive without using both syntaxs?
Any response is highly appreciated. Thanks.
Sep 02, 2011 01:59 PM|james.tsai|LINK
have you looked HttpContext.Current.Session and use it to store/retrieve data?
hope it helps
Sep 05, 2011 09:10 PM|bluesheeva|LINK
I finally create a cookie that identify the session in the server and it works fine. Thanks for the suggestion