Maintaining variables in a column when redirecting to a login page from a FormsAuthentication
Here's our script:
- User logs on to website # 1. After being authenticated, the site gets some credentials about the user (a separate process that has nothing to do with this question) and SENT this information to a page on website # 2
- Website # 2 is protected by FormsAuthentication and redirects the user to the login page.
- At this point, the values published on website # 1 are lost.
Question:
How to save published values from website # 1 during the authentication / login process on website # 2.
What we tried:
- We tried to put the code in the Session_Start method in Global.asmx. We wanted to keep the values in the session, but the session is only started (the breakpoint is hit) when the user is redirected to the login page. By this time, we have already lost value.
- We tried to put some code in Application_BeginRequest, but we cannot access the session from this method.
We need to use POST and not GET because the data length is too long to enter the request. For the same reason why we cannot store the values in the cookie.
+3
source to share