|
 |
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 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 .
|
 |
|
|
 |
|

January 19th, 2007, 03:07 PM
|
Registered User
|
|
Join Date: Jan 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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 
|

January 22nd, 2007, 03:43 PM
|
Friend of Wrox
|
|
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
|
|
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.
|

January 22nd, 2007, 04:31 PM
|
 |
Wrox Author
Points: 71,804, Level: 100 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,050
Thanks: 80
Thanked 1,581 Times in 1,558 Posts
|
|
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.
|

October 17th, 2008, 11:38 PM
|
Registered User
|
|
Join Date: Oct 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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...;)
|

October 20th, 2008, 05:38 PM
|
Registered User
|
|
Join Date: Oct 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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 
|

June 8th, 2010, 11:45 AM
|
Registered User
|
|
Join Date: Jun 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Friends, please check how many working process has IIS configured. Make sure it is set to 1. I realised that if you has this value set to 2 or more, session variables get lost for some reason. I think you need more than one processor in your server if you plan raising the amound of working processes.
|

July 26th, 2012, 03:16 PM
|
Registered User
|
|
Join Date: Jul 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by Mr_Tom
I had to reply here... I think I have found a solution to the random loss of Session Variables issue on IIS6.
Here is what we experienced:
- Session variables seemed to just disappear for no apparent reason
- not reproducible on demand - erratic, sometimes happens every couple of seconds. sometimes it's fine for minutes.
- We have seen the session variables disappear for one page in the site and then re-appear for a different page (or even the same page) later on, not actually having lost the variable for good.
- we actually run those sites load-balanced and it only happened on one of the servers in the webfarm.
[u] Our Solution</u>
For some strange reason we had a non-default setting in the Application Pools Properties. The webgarden was configured to use a maximum of 2 worker processes. With this setting we had the server randomly using process 1 or 2... causing this erratic behavior.
[u] To fix this:</u>
- open the IIS management console
- get properties on: "Application Pools"
- tab to: "Performance"
- find the setting under "Web garden" and decrease the "Maximum Number of Worker Processes" to "1"
- do an IISReset and test your application
This worked for us and saved me a lot of time, as I was just about to re-build the server (I had all my hair pulled out already  :(
Good luck to all!
Thomas
|
Thank you soooooooooooooooooo much! I was on the verge of tears here. Been fighting with the server for days, with a ton of users cursing up to my great-great-grandmother, by e-mail, with copy to the boss (nice co-workers I got, huh?!). And I was about to make a new server, but there is no need now. 
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |