473,804 Members | 3,373 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session Variable dissappears between post backs on Win 2003


I have a problem with a Session variable that dissapears after a
postback of one of my pages.

This only happens on WIn 2003 servers.. it is fine on my XP dev box.

This page opens in another window, but I have ascertained that is is
definitely using the same session ID.

Nowhere on the page do I clear the session variable.. it is only ever
retrieved... this page only works if it is there.

Has anyone had as similar problem? Any help gratefully received!

Dirc
--

Nov 19 '05 #1
6 1282
Is the Windows 2003 server (you say servers which leads me to ask this) part
of a webfarm? You may be losing sessions as you are moved from one server to
another. If this is a the case one way to fix this would be to store session
state on the SQL Server, if you're using one.

Here's an article on how to move session state to the SQL Server. It's easy
to do and has some other benefits such as users not losing their sessions
even if a server in the farm needs to be restarted, etc.

http://idunno.org/dotNet/sessionState.aspx

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Dirc Khan-Evans" <di************ *@eurorscgskybr idge.com> wrote in message
news:uT******** ******@TK2MSFTN GP14.phx.gbl...

I have a problem with a Session variable that dissapears after a
postback of one of my pages.

This only happens on WIn 2003 servers.. it is fine on my XP dev box.

This page opens in another window, but I have ascertained that is is
definitely using the same session ID.

Nowhere on the page do I clear the session variable.. it is only ever
retrieved... this page only works if it is there.

Has anyone had as similar problem? Any help gratefully received!

Dirc
--

Nov 19 '05 #2
No, no, no..

I mean in multiple environments.. dev, testing and live.

BTW, I have also tried using StateServer, since I have been told it is
more reliable.. but something as simple as this should not happen on a
lightly used test server!

--

Nov 19 '05 #3
Dirc,

Ok, I didn't realize you meant between multiple environments. So, you've
already stated that this is not hapenning on your development box. Is it
happening on the testing and production servers both? Are other developers
deploying code to the testing or production servers at the same time?

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Dirc Khan-Evans" <di************ *@eurorscgskybr idge.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
No, no, no..

I mean in multiple environments.. dev, testing and live.

BTW, I have also tried using StateServer, since I have been told it is
more reliable.. but something as simple as this should not happen on a
lightly used test server!

--

Nov 19 '05 #4
S. Justin Gengo wrote:
Dirc,

Ok, I didn't realize you meant between multiple environments. So,
you've already stated that this is not hapenning on your development
box. Is it happening on the testing and production servers both? Are
other developers deploying code to the testing or production servers
at the same time?


No.. I am the only one changing anything in the bin folder... I know
where you are coming from.. There are no changes going on that would
cause an IIS restart.

To reiterate: The interesting things to note is that
(a) it always happens with this page.. it is in no way an intermittent
problem,
(b) this only happens when the new page is displayed in another window.
The first page loads fine but after that the session variable totally
dissappears for no apparent reason.. there is no explicit removal of
any Session variables in the code.
(c) It only happens on IIS6/ win 20003 servers. Not XP
(d) The session has the same sessionID for both windows (as expected).

This really smells of a bug to me.....

Dirc

--

Nov 19 '05 #5
Dirc,

Ok, here's a test to try. In the first window create a button that, when
clicked, response.writes the session variable to the page.

Open the page and click the button to confirm the session variable is there.
Then open your second page. Click the first page's session variable button
again to see if the session variable has disappeared. I'm wondering if the
pop-up window is somehow using a different session.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Dirc Khan-Evans" <dirc.khan-evans@[no_spam_please]eurorscgskybrid ge.com>
wrote in message news:OD******** ******@TK2MSFTN GP09.phx.gbl...
S. Justin Gengo wrote:
Dirc,

Ok, I didn't realize you meant between multiple environments. So,
you've already stated that this is not hapenning on your development
box. Is it happening on the testing and production servers both? Are
other developers deploying code to the testing or production servers
at the same time?


No.. I am the only one changing anything in the bin folder... I know
where you are coming from.. There are no changes going on that would
cause an IIS restart.

To reiterate: The interesting things to note is that
(a) it always happens with this page.. it is in no way an intermittent
problem,
(b) this only happens when the new page is displayed in another window.
The first page loads fine but after that the session variable totally
dissappears for no apparent reason.. there is no explicit removal of
any Session variables in the code.
(c) It only happens on IIS6/ win 20003 servers. Not XP
(d) The session has the same sessionID for both windows (as expected).

This really smells of a bug to me.....

Dirc

--

Nov 19 '05 #6

Do you have anti-virus software running? You stated that you are the
only one changing the bin folder...but if you have anti-virus software
running it could be touching the bin folder. We had the same problem
with session and disabling the anti-virus s/w fixed the problem.
--
Rosanne
------------------------------------------------------------------------
Rosanne's Profile: http://www.highdots.com/forums/m283
View this thread: http://www.highdots.com/forums/t3035507

Nov 19 '05 #7

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

Similar topics

3
2922
by: Geoff Winsor | last post by:
Hi, I am experiencing a problem with recalling a session variable which stores whether a person is logged in to a "members only" section of a website. This area of the site has been working flawlessly for a couple of years under Windows 2000 server but now is very inconsistent following a recent upgrade to Windows server 2003. Following a login, the login info is passed to this asp page that checks an Access database for the user name and...
9
2456
by: William LaMartin | last post by:
I have a problem, mentioned here before, of Session and Application variables disappearing at one site but not at others or on my development computer. The problem is illustrated by an example at http://www.lamartin.com/dotnet/sessiontestset.aspx, were I set Session, Application and Cache variables on the first page and then on the second page view them as the second page is refreshed every five seconds. Before 10 refreshes, the...
0
1181
by: Paul | last post by:
Hello, all --- Environment: Visual Studio.NET 2003 (C#); Windows 2003 Server; IIS 6.0 Here is the problem I am having. I have created a web custom control in C# which includes a datagrid, label, and code to support populating and paging the datagrid. The dataset which contains the data displayed in the datagrid is stored in a session variable. The control displays a list of people. This control is used in two pages in an application. ...
2
2227
by: Paul | last post by:
Tried to post this hours ago, but it still isn't visible. If it's a repeat, sorry for the inconvenience. Hello, all --- Environment: Visual Studio.NET 2003 (C#); Windows 2003 Server; IIS 6.0 Here is the problem I am having. I have created a web custom control in C# which includes a datagrid, label, and code to support populating and paging the datagrid. The dataset which contains the data displayed in the datagrid
5
2855
by: Tim W. | last post by:
Folks. In a B2B Procurement system we've created, we got following Session-Issue: Configuration: We are using IIS 6.0 and added SQL-Based-Sessions in web.config with a timeout of 240 minutes and set them to cookieless mode. As well we added Session.Timeout=240 in asp.net-application and saved data into the session. Session-Timeout in IIS is also set to 240.
4
1955
by: T Ralya | last post by:
I am told that ASP.NET controls the session ID and session variables, but that does not fit my symptoms. I am posting here as directed. I'm hoping that someone can at least recommend something to try to isolate the problem. I have a simple application that demonstrates my problem. Page 1, step1: SaveSessionVariableButton will create a string value, show it on screen, save it in a session variable and show the session ID on screen....
9
2550
by: Adrian Parker | last post by:
We have a website that works everywhere but on a few PCs on this one site.. Asp.Net 1.1 Server = Windows 2003 Client = XP In the web.config we use - cookieless="false" in the browser settings they have "Always allow session cookies" set to true When the browser connects to the website the first page sets a session variable called "user_ref" to something and then calls another page. If on
5
4114
by: Sam | last post by:
Hi All, I have a very weird issue with my session variable and I'm hoping that someone can help me out. The issue is my session variable dissappears after a request is redirected to a new page. What I have in this new page is streamwriter which writes user's data to a log file. Now if I comment out the line that calls the write method of the streamwriter, the session variable is fine. Thanks in advance for any helps
5
2211
by: Twayne | last post by:
Hi, If ever a newbie wants to know how much he has to learn yet, he only has to look here<g>!! ANYway: PHP 5.2.5; XP Pro SP2+, local Apache Server My actual question is: How do I get a POST variable into a session variable so I can use it in any other page I want to use it in? Apparently posted variables are only available in the Form page in
0
9705
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10567
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10310
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9138
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7613
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5515
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4291
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.