473,400 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

session variables being lost

Hi I have a web application vs2005 and it looks like a condition is causing
session veriables to be lost. This does not seem to be happening too often.
The web application allows uploading and deleting files on the server, but
not in the bin directory. I am not sure if this is related. Any idea what
might be causing this and how to fix it?
Thanks.
--
Paul G
Software engineer.
Oct 1 '08 #1
6 2031
if you upload to any folder other than appdata, then a recycle can be
triggered.
-- bruce (sqlwork.com)
"Paul" wrote:
Hi I have a web application vs2005 and it looks like a condition is causing
session veriables to be lost. This does not seem to be happening too often.
The web application allows uploading and deleting files on the server, but
not in the bin directory. I am not sure if this is related. Any idea what
might be causing this and how to fix it?
Thanks.
--
Paul G
Software engineer.
Oct 1 '08 #2
thanks for the information, wondering if this is something new in vs2005 and
if there is a way to shut it off, were you can upload to any other folder
(other than the bin) without loosing the current session variables?
--
Paul G
Software engineer.
"bruce barker" wrote:
if you upload to any folder other than appdata, then a recycle can be
triggered.
-- bruce (sqlwork.com)
"Paul" wrote:
Hi I have a web application vs2005 and it looks like a condition is causing
session veriables to be lost. This does not seem to be happening too often.
The web application allows uploading and deleting files on the server, but
not in the bin directory. I am not sure if this is related. Any idea what
might be causing this and how to fix it?
Thanks.
--
Paul G
Software engineer.
Oct 1 '08 #3
An application domain will unload (causing loss of session variables
unless session state is maintained with State Server or SQL Server),
when any one of the following occurs:

a. Machine.Config, Web.Config or Global.asax are modified
b. The bin directory or any of its contents is/are modified
c. The App_Code directory contents changes
d. The number of re-compilations (aspx, ascx or asax) exceeds the limit specified by the
<compilation numRecompilesBeforeAppRestart=/setting in machine.config or web.config
(by default this is set to 15)
e. The physical path of the virtual directory is modified
f. The CAS policy is modified
g. A web service is restarted
h. (2.0 only) Application Sub-Directories are deleted
i. Any of a number of configurable App Pool recycling reasons occurs
This should cover most scenarios.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================

"Paul" <Pa**@discussions.microsoft.comwrote in message news:3F**********************************@microsof t.com...
thanks for the information, wondering if this is something new in vs2005 and
if there is a way to shut it off, were you can upload to any other folder
(other than the bin) without loosing the current session variables?
--
Paul G
Software engineer.
"bruce barker" wrote:
>if you upload to any folder other than appdata, then a recycle can be
triggered.
-- bruce (sqlwork.com)
"Paul" wrote:
Hi I have a web application vs2005 and it looks like a condition is causing
session veriables to be lost. This does not seem to be happening too often.
The web application allows uploading and deleting files on the server, but
not in the bin directory. I am not sure if this is related. Any idea what
might be causing this and how to fix it?
Thanks.
--
Paul G
Software engineer.

Oct 2 '08 #4
thanks for the additional information, still not sure what is causing it but
I wrote a small sample program and I am able to upload files to the root
directory ok, but when I upload to the bin directory it looses the session
variable, which corresponds to listing c provided. I am not sure what the
CAS policy is, also not quite sure what listing i means?
--
Paul G
Software engineer.
"Juan T. Llibre" wrote:
An application domain will unload (causing loss of session variables
unless session state is maintained with State Server or SQL Server),
when any one of the following occurs:

a. Machine.Config, Web.Config or Global.asax are modified
b. The bin directory or any of its contents is/are modified
c. The App_Code directory contents changes
d. The number of re-compilations (aspx, ascx or asax) exceeds the limit specified by the
<compilation numRecompilesBeforeAppRestart=/setting in machine.config or web.config
(by default this is set to 15)
e. The physical path of the virtual directory is modified
f. The CAS policy is modified
g. A web service is restarted
h. (2.0 only) Application Sub-Directories are deleted
i. Any of a number of configurable App Pool recycling reasons occurs
This should cover most scenarios.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================

"Paul" <Pa**@discussions.microsoft.comwrote in message news:3F**********************************@microsof t.com...
thanks for the information, wondering if this is something new in vs2005 and
if there is a way to shut it off, were you can upload to any other folder
(other than the bin) without loosing the current session variables?
--
Paul G
Software engineer.
"bruce barker" wrote:
if you upload to any folder other than appdata, then a recycle can be
triggered.
-- bruce (sqlwork.com)
"Paul" wrote:

Hi I have a web application vs2005 and it looks like a condition is causing
session veriables to be lost. This does not seem to be happening too often.
The web application allows uploading and deleting files on the server, but
not in the bin directory. I am not sure if this is related. Any idea what
might be causing this and how to fix it?
Thanks.
--
Paul G
Software engineer.


Oct 2 '08 #5
Hi, Paul.

re:
!I am not sure what the CAS policy is

CAS is the Code Access Security configuration

General info:
http://msdn.microsoft.com/en-us/library/930b76w0.aspx

If you create any custom Code Access Security permissions, per the instructions at:
http://msdn.microsoft.com/en-us/library/yctbsyf4.aspx

....as soon as the custom permissions are implemented, the AppDomain will unload/restart,
causing the loss of session variables, unless you don't use in-process state management,
i.e., unless you use SQL Server or State Server to manage state in your application.

re:
!also not quite sure what listing i means?

Whenever you change any configurable reason for an Application Pool to recycle,
that will cause an automatic Application Pool recycle, with the same events
described above occurring.

You can configure Application Pools with the IIS Manager.

Open the IIS Manager, scroll down on the left panel to "Application Pools",
right click the desired Application Pool, select "Properties" and configure to your needs.

Be careful and know what you are doing before changing that stuff, though.
You can seriously harm your Application and server's performance if you misconfigure an App Pool.

More info on Application Pool specific configuration parameters:

http://www.microsoft.com/technet/pro...f894a0cfe.mspx

An extremely good tutorial on Ensuring Application Availability :
http://www.microsoft.com/technet/pro...f894a0cfe.mspx

On this last page, open the fly-ou menu on the left,
and make sure you read through every single page.

It will be one of the best investments you can make in regard to learning
how to configure your applications for top availability and performance.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Paul" <Pa**@discussions.microsoft.comwrote in message news:32**********************************@microsof t.com...
thanks for the additional information, still not sure what is causing it but
I wrote a small sample program and I am able to upload files to the root
directory ok, but when I upload to the bin directory it looses the session
variable, which corresponds to listing c provided. I am not sure what the
CAS policy is, also not quite sure what listing i means?
--
Paul G
Software engineer.
"Juan T. Llibre" wrote:
>An application domain will unload (causing loss of session variables
unless session state is maintained with State Server or SQL Server),
when any one of the following occurs:

a. Machine.Config, Web.Config or Global.asax are modified
b. The bin directory or any of its contents is/are modified
c. The App_Code directory contents changes
d. The number of re-compilations (aspx, ascx or asax) exceeds the limit specified by the
<compilation numRecompilesBeforeAppRestart=/setting in machine.config or web.config
(by default this is set to 15)
e. The physical path of the virtual directory is modified
f. The CAS policy is modified
g. A web service is restarted
h. (2.0 only) Application Sub-Directories are deleted
i. Any of a number of configurable App Pool recycling reasons occurs
This should cover most scenarios.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================

"Paul" <Pa**@discussions.microsoft.comwrote in message news:3F**********************************@microsof t.com...
thanks for the information, wondering if this is something new in vs2005 and
if there is a way to shut it off, were you can upload to any other folder
(other than the bin) without loosing the current session variables?
--
Paul G
Software engineer.
"bruce barker" wrote:

if you upload to any folder other than appdata, then a recycle can be
triggered.
-- bruce (sqlwork.com)
"Paul" wrote:

Hi I have a web application vs2005 and it looks like a condition is causing
session veriables to be lost. This does not seem to be happening too often.
The web application allows uploading and deleting files on the server, but
not in the bin directory. I am not sure if this is related. Any idea what
might be causing this and how to fix it?
Thanks.
--
Paul G
Software engineer.



Oct 3 '08 #6
Paul wrote :
but when I upload to the bin directory it looses the session
variable,

"Juan T. Llibre" wrote:
>b. The bin directory or any of its contents is/are modified
There's your reason...

Hans Kesting
Oct 3 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Brad | last post by:
Hi everyone, I've been using ASP on a few different projects over the past year, either using Javascript or VBScript. During that time, I've made use of session variables, but even then, I've...
3
by: Microsoft | last post by:
I am using Session variables in my ASP application. I have tested the application on a Win2k professional and it works fine. When the same web app is installed on a win2k advanced server from the...
7
by: Billy Jacobs | last post by:
I am having a problem with my session variable being set to Null for no apparent reason. I am declaring it like the following when the user logs in. dim objUserInfo as new clsUserInfo 'Set...
1
by: Eliyahu Goldin | last post by:
When I run my ASP.NET application first time after deployment, it runs OK. On the second run, when one of my web forms tries to read session variables set in another form, it finds them empty....
10
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much...
2
by: Tomas Martinez | last post by:
Hi, Well, my problem is so simple as it says in the subjet but very frustrating also. I have a project and it is losing the session variables with each postback, so I downloaded from the web a...
7
by: Erik | last post by:
I have an application that uses sessions variables a lot but one I publish the application on the prod server these variables are lost. The application is written i c# 2.0 and I've set the...
2
by: maxkumar | last post by:
Hi, I am running a ASP.NET 1.1 site on Win Server 2003 with IIS 6.0. The website has been running for about 1.5 years now. In the past, we used to have random cases of session variables getting...
0
by: Aarchaic | last post by:
Hello i have problem my session variables seem to disapear as i go along i've created this code to ilustrate whats happening First off i just post 3 detials like a name a age and a favourite...
22
by: K. A. | last post by:
I have two servers at work, 'A' for testing and development, and server 'B' for production. On server A, I wrote a PHP test code to login users then direct them to a personalized page. This is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.