Solved

Redirect Session time out runtime error to a custom error page

Posted on 2007-04-01
3
296 Views
Last Modified: 2008-03-06
Hi,

Having a vb.net application which hondles error messages using Error.aspx page. When session times out the 'yellow' runtime error is displayed. Session time out is defined within the web.config. I am not sure how to trap the runtime error so when ever session is ecpired then I redirect users to the same Error.aspx page.

Thanks in advance
0
Comment
Question by:shmz
3 Comments
 
LVL 28

Accepted Solution

by:
iboutchkine earned 500 total points
Comment Utility
after body tag


<script language="javascript">
window.setTimeout("alert('you will be logged off in 5sec');",5000);
window.setTimeout("reDirect()",10000);

function reDirect() {
window.location.href = "http://www.google.com";
}
</script>
============================
redirect to another page when page timed out
<html>
<head>
<title>My Redirect</title>
</head>
<body>
This page will redirect to <b>http://www.msdn.microsoft.com</b> in 5
seconds.
</body>
<script language="javascript">
window.setTimeout("reDirect()",5000);

function reDirect() {
window.location.href = "http://www.msdn.microsoft.com";
}
</script>
</html>
=========================================
redirect to another pade after session expired

if Session.item("KEY") = Nothing then
   Response.Redirect("LoginPage.aspx")
end if
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Visual Studio Code with .Net Core 5 15
Using MS Code on my Mac 6 44
Make a border less form movable 2 11
XML & .net 5 16
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now