p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #101 (permalink)  
Old January 19th, 2007, 03:07 PM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Regarding this feature where .NET watches a directory for changes and restarts, is there some way of disabling it? I have a folder that contains changing items and I want to exclude this folder from forcing the site to reload. I have tried moving the folder around but since it contains DLLs used by the site it seems that it gets watched regardless of where I put it. There must be SOME way of configuring the service to ignore a folder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #102 (permalink)  
Old January 22nd, 2007, 03:43 PM
Friend of Wrox
Points: 5,269, Level: 30
Points: 5,269, Level: 30 Points: 5,269, Level: 30 Points: 5,269, Level: 30
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 1 Time in 1 Post
Default

This has all been very interesting and illuminating. I now have a clearer understanding of features of IIS.

But my problem appears to be an animal of a different stripe. When one of my users loses his credentials being held in the Session, all users lose their credentials and are presented the login page instead of the requested page.

Now, each person’s Session is actually an element in an object that holds all the “Sessions.” (A Dictionary object I believe.) Since all Sessions evaporate at the same time, I am presuming this central object is being reset, or abandoned and recreated.

If anyone has any insight on what mechanism might be at play here, I’d be really happy to hear it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #103 (permalink)  
Old January 22nd, 2007, 04:31 PM
Imar's Avatar
Wrox Author
Points: 33,563, Level: 80
Points: 33,563, Level: 80 Points: 33,563, Level: 80 Points: 33,563, Level: 80
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,231
Thanks: 7
Thanked 203 Times in 201 Posts
Default

Hi Brian,

Isn't this what most of the posters had problems with? When the IIS process is recycled, or web.config is touched, the *whole* session state goes down.

Did any of the situations apply to you? That is, do you have application pools set to recycle automatically at a certain interval for example?

Take a look here: http://blogs.msdn.com/david.wang/arc...e_on_IIS6.aspx for some more background.

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #104 (permalink)  
Old October 17th, 2008, 11:38 PM
Registered User
 
Join Date: Oct 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Got the same problem: Session vars disappear!

Using trace="on", could see session vars on page load but on post back all session vars gone! Didn't show up until switched from asp.net 1.x to 2.0

Took awhile but I did find the cause. Not in the vb source code...it's in one of the asp:image... tags! Two ways to fix or work-around:

1) Remove or comment out asp:image tag
   (just ones with missing imageURL should do)
2) Add imageURL="valid link" to asp:image tags (if missing)

To test, deleted almost all code in the code behind. Except for setting about 5 session vars on page load and one in post back.
I didn't try imageURL with an invalid link to see if that blows-up all the session vars too, geez, I hope not.

In original asp.net 1.x version the imageURL fragment was set in code. At design time, the imageURL was left blank. This didn't affect the session vars as it seems to do now under asp.net 2.0

<!--
If I may politically digress, hasn't someone read you the book 'The Earth is Flat'...Session Vars CAN'T DISAPPEAR...you're wrong!!!!
-->

I've noticed this is one of several problems that seem to have no solution...;)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #105 (permalink)  
Old October 20th, 2008, 05:38 PM
Registered User
 
Join Date: Oct 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

On further review, there seems to be more than one issue that can cause disappearing session vars.

Older documents document, undocumented behavior of ReadOnly session vars: "If you attempt to write to a read-only session variable, no exception is thrown but a new session ID is generated...can create subtle bugs in your code...check the IsReadOnly property before assigning..."

<%@ Page EnableSessionState="ReadOnly %>

On hosted servers with garderns, farms and proprietary performance enhancers it may not be impossible to track session var behavior but software source generation performance can be severely reduced
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Session Variables Randomly Disappeared Dmitriy .NET Framework 1.x 1 November 30th, 2006 01:24 AM
Session Variables in C# shikha09 C# 1 November 28th, 2006 10:38 AM
Session Variables Randomly Disappeared Dmitriy General .NET 0 November 20th, 2006 08:42 AM
Is it possible for me using session variables into see07 ASP.NET 1.x and 2.0 Application Design 4 March 9th, 2005 07:46 PM
session variables help face Classic ASP Databases 4 September 12th, 2003 04:57 PM



All times are GMT -4. The time now is 05:04 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc