Solved

Redirect Session time out runtime error to a custom error page

Posted on 2007-04-01
3
302 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
ID: 18835334
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 Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

726 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