Option 1: Set up a redirect on the page a minute or two less than session
timeout. Redirect to logout.aspx and abandon the session there. Then, a user
that walks away is logged out and cannot get the ASPX error. On the logout
page have the message: "you have been logged out due to a timeout in your
session, click here to log in again". Or you can duplicate the login box on
that screen. Your choice.
If you choose this option, you should also disable the back button. The
easiest way is to set up JavaScript that pushes the person forward one page
in history, so they are always on the page ahead of the page they are on.
<script language="javas cript">
window.history. forward(1);
</script>
Option 2: Set up a friendly error page that says something like:
There was an error in the application. One of the most common reasons is you
were an idiot and walked away while you were filling out a form. If this is
you, click here to log in again.
Yes, the message was a joke, but you should get the idea. :-)
I would try option 1 first. It is friendlier and th
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss
or just read it:
http://gregorybeamer.spaces.live.com/
*************** *************** **************
| Think outside the box! |
*************** *************** **************
"Mufasa" <jb@nowhere.com wrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
Folks,
I'm having problems with my session timeout. People using my website leave
it just sitting there while they do other things. They have logged in (
using Forms Authentication ) and will be doing other things will a page of
mine is up on the screen. But the session times out so that when I try and
use a session variable, it crashes saying Object reference not set to an
instance of an object.
So I put
<sessionState timeout="4800" />
in my web.config (I know it's ridicously long....)
I went in to IIS and changed the Session timeout to 720.
I stopped IIS and restarted it.
I verified the setting in Session Timeout.
I put on my page a print of the session timeout and it shows 4800.
But people are still getting the error after 30 minutes.
What am I missing? Do I want to disable Session State?
TIA - Jeff.