I have a VS 2011 solution file with two projects, each is a project file for a web app. One is an older version of the application and the other is a newer version. When a user signs in to the older version, depending on their membership, they might be redirected to the new version. When they do land on the new website, they should not have to go through authentication, instead go directly to their page within the app.
To handle this, I am using response.redirect from the older application along with a querystring indicating that the user has been authenticated.
code in older version:
Response.Redirect(sURL + "?Auth=" + sAuth, false);
I am checking for the querystring on the page_load event of the login.aspx.cs of the new app (something like "if querystring authentication = true then continue to next page"). However, I still get the login page.
Code on page_load event of new app:
if (Page.IsCrossPagePostBack)
{
string sAuthenticate = Request.QueryString.Get("Auth").ToString();
if (sAuthenticate == "1")
{
ByPassAuthentication();
}
}
How can I bypass the login page?