I've got a standard form on an ASP page to collect resumes from visitors.
The page can be accessed only after the visitor has logged into the site.
The issue that I'm running into is that the users are exceeding the length
of the session timeout, so when they submit the form, it is taking them back
to the login page instead of submitting the form.
The solution I am trying (extending timeout session is not an option due to
the heavy load on this server) involves writing a Javascript timer that
triggers an automatic request for a .asp page by setting the object of an
IMG SRC tag. The JS calls the "image" X minutes before the session
expiration, and there's some basic asp code in the "keepalive.asp" page to
ensure that the asp interpreter is invoked.
I've checked the IIS logs and have confirmed that the keepalive.asp page is
being requested at the appropriate intervals, and I've also confirmed that
the session ID on those calls is the same as the initial call to the
"resumeinput.asp" page.
Unfortunately, this is not keeping the session alive. Can someone shed some
light on why this method of keeping the session alive is not working?
Here's some snippets of my code:
function refreshIt() {
if (!document.images) return;
document.images['myPic'].src = 'sessionkeepalive.asp'
setTimeout('refreshIt()',60000); // refresh every X minutes
}
and here's the code for the image/asp:
<img src="keepalive.asp" name="myPic" width="1" height="1">
Thanks,
Jason