time-out error page handle

L

Laurahn

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.
 
C

Cowboy \(Gregory A. Beamer\)

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.
 
W

Walter Wang [MSFT]

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 ([email protected], 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.
 
W

Walter Wang [MSFT]

Hi Laurahn,

Have you seem above replies? Please feel free to let us know if there's
anything unclear. Thanks.


Regards,
Walter Wang ([email protected], 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,142
Messages
2,570,820
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top