Session timeout & method="post"

  • Thread starter Thread starter Billy Boone
  • Start date Start date
B

Billy Boone

I have a current web application that utilizes a login to authenticate users
into the application. Once I authenticate them, I store away the user's
name in a Session variable. I then utilize this check to confirm the
session has not timed out (isLogon.asp - which I include on every page).

if Session("user") = "" then
call setURL()

Response.Redirect "login.asp"
end if

function setURL()
Session("TargetPage") = Request.ServerVariables("PATH_INFO")
Session("QueryString") = Request.ServerVariables("QUERY_STRING")
end function

I then utilize this function to upon login return the user back to where
they left:

function getURL()
dim url

if Session("TargetPage") <> "" then
url = Session("TargetPage")

if Session("QueryString") <> "" then
url = url & "?" & Session("QueryString")
end if
end if

getURL = url
end function

This all assuming using the "get" method on forms - which was fine given the
limited data being collected on the form.

A new requirements has been given that will require lots of data (well over
the QueryString limits). So seems I need to go to the "post" method on my
forms. However, with this method how do I ensure I return the user to the
appropriate location upon a session timeout??

Any pointers would be most appreciated.

BBB
 
Billy Boone said:
I have a current web application that utilizes a login to authenticate users
into the application. Once I authenticate them, I store away the user's
name in a Session variable. I then utilize this check to confirm the
session has not timed out (isLogon.asp - which I include on every page).

This all assuming using the "get" method on forms - which was fine given the
limited data being collected on the form.

A new requirements has been given that will require lots of data (well over
the QueryString limits). So seems I need to go to the "post" method on my
forms. However, with this method how do I ensure I return the user to the
appropriate location upon a session timeout??

Any pointers would be most appreciated.

I suggest you look into forms authentication. It's the "wheel" that you
shouldn't be reinventing.
 
Back
Top