Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:45 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.