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

April 19th, 2006, 10:56 AM
|
|
Registered User
|
|
Join Date: Apr 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I thought this one warranted a new post and not just an edit.
Apparently, the main issue here is web gardens. I have found multiple sources saying how session state in-process should not be used in web gardens (i.e. - worker processes greater than 1 in the app pool). Basically, these are the side effects of a web garden: - If your application uses session state, it must choose an out-of-process provider (NT Service or SQL).
- Application state and application statics are per process, not per computer.
- Caching is per process, not per computer.
What are the benefits?
Not really sure, but check out this article for some good info:
http://www.microsoft.com/technet/com...i0803.mspx#EQD
One benefit they mention is that if you have a slow DB connection, you can increase the througput with multiple connections - one per worker process. To me, that's kind of stupid because you're not getting the in-process session state, which means you probably have to use a DB. But if you have a slow DB, then what's the point of using a DB for storing session info?
|
|

April 25th, 2006, 03:02 AM
|
|
Registered User
|
|
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I have the same problem, the recycle workers recycle after 1740 minutes, but the problem is strange. my box runs on IIS 6 and classic asp. I have to enter information trice before it stores in a session variable, but once done so if I give new information to the session variables they wouldnt be changed (retains old values). Please HELP....
|
|

April 25th, 2006, 04:40 PM
|
|
Registered User
|
|
Join Date: Apr 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I can't imagine why that would happen. Maybe it has to do with the # of worker processes. Try changing it to 1 and see what happens. Otherwise, I'd recommend you just roll over to .NET.
|
|

August 9th, 2006, 05:30 AM
|
|
Registered User
|
|
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The other thing you can check is how many worker processes are you running on the website. I had the same problem and noticed lots people talking about worker processes being recycled, hence I realised there is a connection. I run 2 processes per website and found that what was happening was:
1) You create the session var, this will associate it with a particular process ID
2) When you refresh the page you may or may not use same process ID so the session var seems to appear or disappear.
Once I stopped using multiple processes for this one website it sorted it, I didn't like but I couldn't see another solution if I wanted to continue to use session variables
|
|

November 16th, 2006, 03:56 PM
|
|
Friend of Wrox
|
|
Join Date: Jul 2003
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Hi,
I am having the "random Session disappearance" problem in my ASP.NET application. Why random? Most of the time the application working as it supposes to be, but occasionally, the Session variable start setting to Nothing by some reason when I am redirecting from one page to another from inside the Java script on the previous page.
Example:
This is the Java script on the page A.ASPX:
function DoSomeWork(numMapX,numMapY) {
//debugger //TO DO the DEBUGGING
var sURL;
sURL = "B.aspx?"+
"action=Identify&" +
"X="+numMapX.toString()+"&"+
"Y="+numMapY.toString()+ "&"+
"activeLayer=" + document.Form1.activelayer.value+"&"+
"width="+ (maxx-minx);
objWin = window.open(sURL, "Identify", "height=430,width=890,scrollbars=yes,resizeable=ye s");
if (parseInt(navigator.appVersion) >=4)
objWin.window.focus();
}
As you can see, I am calling the page B.ASPX from the page A.ASPX to open in separate window and do some work. I am creating the Session variable inside the page A.ASPX and using same variable inside the page B.ASPX. Like I've mentioned before, most of the time it works fine, but from time to time it start giving me this "random Session disappearance" problem.
What is interesting, if I am running the application (which is located on the server PC) from my browser, or if I am running the application code from my developer's PC, I have this problem till I reboot my PC.
After that the problem magically disappeared and I can run the application normally (from the server and from my local machine)!?
What is going on? Any suggestions will be appreciated.
-Dmitriy
|
|

November 27th, 2006, 02:44 PM
|
|
Registered User
|
|
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Ron (hsilived),
I hope that you're still checking this thread. I have a question about your setup. Is the Session State for your app setup with InProc, StateServer or SqlServer? I'm not familiar with the App Pool so I don't know if your solution would apply when the mode is StateServer, which is how mine is set up. I also haven't confirmed that we're experiencing the "disappearing session variables" problem but I'm pretty sure. So it'd be helpful to know that others with the same setup(Session mode=StateServer) have had this problem.
To anyone else who has had the disappearing session variable problem, was your app set up to store session state using something other than InProc?
The session state mode is a pretty significant detail in this discussion so it'd be great if any future posters could include what session state mode their app uses.
My web app is running on two servers: one running Windows Server 2000\IIS 5, the other running Windows Server 2003/IIS 6.
Thanks everyone.
|
|

November 30th, 2006, 02:28 AM
|
|
Registered User
|
|
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi.
"Session variables are getting lost/cleared"
Actually i have no problems using the inProc modes for sessions, however, there is one pc that may seem losing the session variables. The serious problem is that once you have logged into the site the next page you try to open logs the user out. So basically the session variables are getting lost/cleared. The site is perfectly fine on other computers. Btw, i found out that the firewall of the problem pc is blocking the port 1025-65000, which based on my understanding is being used by the RPC; do you have any suggestions?
<The problem box connects to a LINUX server>
|
|

December 6th, 2006, 10:17 PM
|
|
Registered User
|
|
Join Date: Apr 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I found changing
session.auto_start = 0
to
session.auto_start = 1
in my php.ini did the trick for me
|
|

December 12th, 2006, 12:59 PM
|
|
Registered User
|
|
Join Date: Dec 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Good afternoon,
Not sure if this is still an on-going issue, but I found this thread very useful in my search as to why my session variables were working in FireFox and not Internet Explorer.
My issue wasn't related to IIS, Application Pools, etc., but was related to the new P3P features enforced by default in IE6. I had an iFrame being loaded outside of my domain and IE was treating it as a 'Third Party' site because of such, which in turn was not allowing my cookie to be set and eliminating the ability to save the session ID. By adding a P3P policy and appending the proper headers, I was able to get it to accept it somewhat, but I'm still working out a few minor issues. I've provided some links below which seemed to have solved my issues.
http://support.microsoft.com/default.aspx/kb/323752
http://msdn.microsoft.com/workshop/s...privacyie6.asp
I hope this helps solve anyone else's issues if this is what they're experiencing as opposed to IIS/Worker Process issues.
-Justin
|
|

January 19th, 2007, 02:11 PM
|
|
Registered User
|
|
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I experienced the same problem mentioned - on my dev machine things worked fine but on the production site the session would get lost. I tracked it down to my log file being placed in the same directory as the DLLs. I did some testing by creating files in different places and it looks like it's not just the bin folder that is checked for updates so I moved the log file into a directory up one level.
|
|
 |