?
Solved

Classic ASP Session State on IIS6 move - losing session variables

Posted on 2008-02-06
5
Medium Priority
?
2,981 Views
Last Modified: 2009-06-04
We have a critical app that has been running on NT4 under IIS4 and using MTS. The web site takes uploads from users, writes the file to a process directory,which is not the same path as the web app, and there is data stored in a SQL 7 database. There are other programs that are used on the same server that take the data and use to to do some processing and then update the database with the results. There are about 9 seperate classes that are used in the website that were developed in VB6 and the webpage uses   createobject to get a reference and the variables used are session("name) -which is Classic ASP standard practice.
The files that are uploaded by the user are given a new name on the server based on a user identifier and a sequence number. Those names are both displayed after uploading.
The dataload increased dramatically and was causing huge delays in processing. That kicked off the effort to move this to a Windows 2003 box with multiple processors and 8Gig of ram with IIS6 and running SQL 2000.
In testing, the system started reporting errors with the files. It had the original file name, the server filename, and the file it had the error with - was completely different. That filename was from another persons session. The User identifer and sequence number that should have been in the session variables were apparently confused within a very short period of time - all 5 people testing the app saw the same type of error.
We are losing session variables, we have one app pool with one worker process.
There is not a web farm - this is all on one box -- as they do not want to re-architect or rewrite the app.
The box being moved to has SP1 Windows 2003.- SQL 2000 SP4 - IIS6 and nothing else running on the box except this app.  
I am feeling a bit stumped and am reaching out here for some help on what to look for.
0
Comment
Question by:mitchellm44
4 Comments
 
LVL 51

Expert Comment

by:Ted Bouskill
ID: 20838542
Windows 2003 closed a number of security holes that were open in ASP applications in previous versions of Windows.  This includes making it more difficult to get access to and run system 'objects' which could expose the server to risk.  You'll have to dig through the Microsoft site for information about the differences.
0
 
LVL 82

Expert Comment

by:hielo
ID: 20838848
On this link:
http://www.dotnetspider.com/qa/Question17.aspx

Under Post: "01 Dec 05 05:22 AM : Ahmed : Jordan" it states:

"...Well, we solve the problem, we were hosting our web application at web garden architicture server machines (multi server machines), at that time our session mode was InProcess so, no unexpected logged out was happen in our local machines but when we host it to server unexpected logged out appears. So, web garden server machines seems to distribute our worker  processes so Session mode shall be in StateServer mode.

As i read, and for the reason that Worker process is distributed, you cannot use InProcess mode.
therefore, you should set session mode to stateserver, and make sure that your Session object is Serialized and any other objects that it used shall not be serialized.

another thing make sure that you don't miss your connections (leaking of connections) by disposing each connection opened, since any exception appeared within uses of connection will not close it, it will still opened so try to dispose connections always, even if you close it.. "

That seems to address your problems. If not, the other two posts that follow that also seem very relevant to your issue.

0
 
LVL 2

Accepted Solution

by:
mitchellm44 earned 0 total points
ID: 20880527
regarding 2003 closing security holes - That was known. pointing to the documentation is not really a sufficient answer.
The post about Serializing connection objects - would be applicable if we were in .Net - however this was VB6.
The solution that We came up wiith was not even suspected at the time of the posting. The server was being started with Terminal Services. The fix was to use the Console Switch to force the Terminal services to Session 0 - and then the session variables do not get lost. I did not find anything that spoke to that, it was something that one of our server support people found, and worked.  
I will ask to have the points refunded.
0
 
LVL 5

Expert Comment

by:Netminder
ID: 20925746
Closed, 500 points refunded.
Netminder
Site Admin
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
There may be issues when you are trying to access Outlook or send & receive emails or due to Outlook crash which leads to corrupt or damaged PST file. To eliminate the corruption from your PST file, you need to repair the corrupt Outlook PST file. U…
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…
Suggested Courses
Course of the Month4 days, 5 hours left to enroll

599 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question