?
Solved

Redirect Session time out runtime error to a custom error page

Posted on 2007-04-01
3
Medium Priority
?
312 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 28

Accepted Solution

by:
iboutchkine earned 2000 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

801 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