C
chris fellows
I have a generic authentication web page Authentication.aspx that is used by
other web pages to authenticate the user if their application session has
expired after N minutes since they last logged in.
PageA.aspx redirects to PageB.aspx. PageB.aspx (in Page_Load) then redirects
to Authentication.aspx. Some Javascript in Authentication.aspx checks if the
application session has expired and, if so, authenticates the user's
username & password. The Javascript then sets window.location to return to
PageB.aspx so that the user can continue.
For each web page, how do I ensure that the Authentication page only gets
shown on the first Page_Load for the user? The Javascript window.location
method seems to cause ASP.NET to create a new instance of PageB.aspx and not
return to the instance that original redirected them to Authentication.aspx.
This causes PageB.aspx to constantly redirect to Authentication.aspx.
(Please don't recommend using the ASP.NET 2 Login controls for
authentication. I am well aware that they exist!!!)
other web pages to authenticate the user if their application session has
expired after N minutes since they last logged in.
PageA.aspx redirects to PageB.aspx. PageB.aspx (in Page_Load) then redirects
to Authentication.aspx. Some Javascript in Authentication.aspx checks if the
application session has expired and, if so, authenticates the user's
username & password. The Javascript then sets window.location to return to
PageB.aspx so that the user can continue.
For each web page, how do I ensure that the Authentication page only gets
shown on the first Page_Load for the user? The Javascript window.location
method seems to cause ASP.NET to create a new instance of PageB.aspx and not
return to the instance that original redirected them to Authentication.aspx.
This causes PageB.aspx to constantly redirect to Authentication.aspx.
(Please don't recommend using the ASP.NET 2 Login controls for
authentication. I am well aware that they exist!!!)