473,666 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Losing session variables

M
Have you come accross the issue described below or know more about it?

We have come accross a situation where session variables are getting
lost temporarily but come back again if user reloads the same page.

Found that whenever the server has to load/compile (not sure which) the
website dlls (for eg the first time a page is requested from a website) and
if the browser makes a subsequent request for another page (for eg the first
page contains an iframe) then the session variables are not visible in the
second page. Strangely the session variables become visible if the browser
re-submits the request. Normally the compile/load process only happens the
first time a page is accessed but our virus scanner appears to be amending
some file in the website (web.config perhaps) and so the web server
re-loads/re-compiles the dll's quite frequently.

We have got around this by not using an iframe in the offending page and
excluding the website directory (for now) in the virus scanner.

Nov 18 '05 #1
2 2353
That is the correct behavior. Session objects are mapped into the same app
domain process space of which the page request is being served. Therefor
session variables will be susceptible to process recycling and app domain
unloads. You've taken the appropriate action here. All should be well. The
iframe part should not have any effect on session values, but keeping the
virus scanner away from the webconfig files is the cure. Also keep the
indexing service away from that directory as well.

--
Regards,
Alvin Bruney
Got DotNet? Get it here
www.networkip.net/tidbits
"M" <mh*******@hotm ail.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Have you come accross the issue described below or know more about it?

We have come accross a situation where session variables are getting
lost temporarily but come back again if user reloads the same page.

Found that whenever the server has to load/compile (not sure which) the
website dlls (for eg the first time a page is requested from a website) and if the browser makes a subsequent request for another page (for eg the first page contains an iframe) then the session variables are not visible in the
second page. Strangely the session variables become visible if the browser
re-submits the request. Normally the compile/load process only happens the
first time a page is accessed but our virus scanner appears to be amending
some file in the website (web.config perhaps) and so the web server
re-loads/re-compiles the dll's quite frequently.

We have got around this by not using an iframe in the offending page and
excluding the website directory (for now) in the virus scanner.

Nov 18 '05 #2
M
Thanks Alvin, was useful to get some confirmation about this. I will also
look into the tip about the indexing service.
"Alvin Bruney" <al**********@h otmail.com> wrote in message
news:u1******** ******@TK2MSFTN GP09.phx.gbl...
That is the correct behavior. Session objects are mapped into the same app
domain process space of which the page request is being served. Therefor
session variables will be susceptible to process recycling and app domain
unloads. You've taken the appropriate action here. All should be well. The
iframe part should not have any effect on session values, but keeping the
virus scanner away from the webconfig files is the cure. Also keep the
indexing service away from that directory as well.

--
Regards,
Alvin Bruney
Got DotNet? Get it here
www.networkip.net/tidbits
"M" <mh*******@hotm ail.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Have you come accross the issue described below or know more about it?

We have come accross a situation where session variables are getting
lost temporarily but come back again if user reloads the same page.

Found that whenever the server has to load/compile (not sure which) the
website dlls (for eg the first time a page is requested from a website)

and
if the browser makes a subsequent request for another page (for eg the

first
page contains an iframe) then the session variables are not visible in the second page. Strangely the session variables become visible if the browser re-submits the request. Normally the compile/load process only happens the first time a page is accessed but our virus scanner appears to be amending some file in the website (web.config perhaps) and so the web server
re-loads/re-compiles the dll's quite frequently.

We have got around this by not using an iframe in the offending page and
excluding the website directory (for now) in the virus scanner.


Nov 18 '05 #3

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

Similar topics

7
7784
by: vivek | last post by:
Do any of you guys have any idea what might be the reason for losing session variables, i was working on a page where i had to stroe a array in a session(trust me that was the only 'way' i could imagine doing it), and i am losing the session variable, its just returning empty values...does any one has any ideas?
1
2778
by: Scott Lyon | last post by:
I'm maintaining (read: I didn't write it, nor do I have the time to spend to rewrite it) an application that is suddenly giving me grief. The reason I say suddenly, is because we're in the process of transitioning the server on which it runs from Microsoft Windows 2000 Server, to 2003 server (going from IIS 5 to IIS 6). This problem hasn't really occurred on the 2000 server machine, but it's happening MUCH more on the new 2003 box (not...
2
3302
by: Terry | last post by:
When launching our application with Internet Explorer already opened, but not pointing to our web server, the session variables disappear. If you open I.E. after launching our app, it works fine. It also works fine if you have the option set to 'Reuse Windows for Lauching Shortcuts' checked in the I.E. properties and launch our app from a shortcut, but it fails it you launch it from the I.E. favorites or some other method that won't take...
2
1804
by: James | last post by:
Session("UserName") is set when someone logs in. Get to a page that displays a record where you can type a comment. The form has an onSubmit event that calls a javascript function. That function sets a javascript variable called beenChecked = true and then calls a PopUp window to spell check the comment. When it's done spell checking, it calls the submit method on the form tag of the opening window. The method evaluates that it's...
3
1981
by: ACaunter | last post by:
Hi all, I'm wondering why I keep losing my session variables all the time. I've set the timeout to be an hour, but for some reason randomly i keep losing everything.. what could be causing this?? also, is there a way to automatically go back to the login page as soon as the sessions have expired or are lost. thanks
0
1390
by: Jimmy Reds | last post by:
Hi, Sorry if this appears twice but I post through Google Groups and it had a funny 5 minutes and didn't appear to post this message the first time. I am setting session variables on a page then doing a header/location redirect to a second page however I am losing one of my session variables. Not all of them, just one.
2
1555
by: Jimmy Reds | last post by:
Hi, I am setting session variables on a page then doing a header/location redirect to a second page however I am losing one of my session variables. Not all of them, just one. Here are some details/comments: I am doing a session_start() on ALL of my pages, right at the top of each page
2
2539
by: Geoff Berrow | last post by:
I have a page containing a form. The page submits to itself and if the data validates, stores the posted variables into a database and also into a session. I then use header to redirect to another page which fetches the variables from the session array and displays them. All works fine on the Linux test server. However the production server is Windoze running PHP 5. reg globals off I am intermittently losing variables. from the...
0
1809
by: jason.friesen | last post by:
Hi Folks I have a custom CMS built in classic ASP that is losing session variables. To wit, I can create a situation where my 'show all the set SVs' test page shows a different set of SVs on each refresh of the browser. My test page goes a little something like this: <h1>Checking Session Variables</h1> <h2>Checking what session variables are set.</h2> <p>
5
6130
by: chromis | last post by:
Hi there, I've recently been updating a site to use locking on application level variables, and I am trying to use a commonly used method which copies the application struct into the request scope. Application variables are then accessed in this manner Request.App.<Var>. To begin with I had a simple functioning login system inside a subdirectory named admin, this subdirectory had it's own application.cfm, I wasn't sure whether to duplicate...
0
8444
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
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8869
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...
0
8639
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7386
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...
0
4198
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
4368
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1775
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.