Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 11th, 2010, 10:27 AM
Registered User
 
Join Date: Mar 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Session Loss

I had an issue with several applications that seemed to just lose session randomly. To combat the issue, I created the session in the start page and gave it the value "". Then, in the controls that required the session, I threw this code in the page load:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Try

If Session("SessionName") = Nothing Then


Response.Redirect("Error Page", False)
Exit Sub
End If
Catch
Response.Redirect("Error Page", False)
Exit Sub
End Try
End Sub




Similar Threads
Thread Thread Starter Forum Replies Last Post
possible loss of precision hobby Java Basics 7 September 19th, 2008 09:41 PM
Format loss on import needelp Access VBA 1 September 11th, 2006 07:34 AM
Session variable Loss - asp.net gala1 VS.NET 2002/2003 1 January 24th, 2005 02:08 AM
Major performance loss on split DB roniestein Access 67 October 22nd, 2004 11:55 AM
I'm at a loss with IIS 5.1... wrofox Classic ASP Basics 0 September 19th, 2004 02:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.