473,383 Members | 1,735 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,383 software developers and data experts.

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 2331
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*******@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.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**********@hotmail.com> wrote in message
news:u1**************@TK2MSFTNGP09.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*******@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.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
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...
1
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...
2
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....
2
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...
3
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??...
0
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...
2
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...
2
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...
0
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...
5
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.