Hi:
In my app, when the page has made a time-out, how can i redirect to a
predefined error page on the IIS, when the user try to do an action, with a
configuration in the web.config.
Cowboy (Gregory A. Beamer) - 01 Jun 2007 23:53 GMT
The browser does not know when the application times out, so you can only
handle as an error, if one occurs. You can set it so the page automatically
goes to a logoff page after so many minutes, but you should also make sure
they cannot use the back button if you do that. That is done with
JavaScript.

Signature
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)
************************************************
Think outside the box!
************************************************
> Hi:
> In my app, when the page has made a time-out, how can i redirect to a
> predefined error page on the IIS, when the user try to do an action, with
> a configuration in the web.config.
Walter Wang [MSFT] - 04 Jun 2007 03:17 GMT
Hi Laurahn,
Which time-out are you referring to? Do you mean that a page failed to
finish executing (which has a default 90 seconds for 1.x and 110 seconds
for 2.0 and can be controlled by <httpRuntime> in web.config or
HttpServerUtility.ScriptTimeout property). Or do you mean the timeout of
the session.
For the request timeout, you can define a custom error page for error code
500:
<customErrors mode="On">
<error statusCode="500" redirect="ErrorPage500.aspx" />
</customErrors>
For the session timeout, please see following if following article useful:
#Build an ASP.NET Session Timeout Redirect Control
http://www.eggheadcafe.com/articles/20051228.asp
Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Walter Wang [MSFT] - 06 Jun 2007 03:53 GMT
Hi Laurahn,
Have you seem above replies? Please feel free to let us know if there's
anything unclear. Thanks.
Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.