473,545 Members | 2,627 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Losing sessions. Sort of.

1 New Member
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:

Expand|Select|Wrap|Line Numbers
  1. <h1>Checking Session Variables</h1>
  2. <h2>Checking  what session variables are set.</h2>
  3. <p>
  4. <%
  5. dim k
  6. For Each k in Session.Contents
  7.   Response.Write(k & "<br />")
  8. Next
  9. %>
  10. </p>
  11. <h2>Checking the contents of the session variables.</h2>
  12. <p>
  13. <%
  14. dim i
  15. dim j
  16. j=Session.Contents.Count
  17. Response.Write("Session variables: " & j & "<br />")
  18. For i=1 to j
  19.   Response.Write(Session.Contents(i) & "<br />")
  20. Next
  21. %>
  22. </p>
  23.  
So. In Firefox I open three tabs, one with my test page, one with my login page, and one with a sample page within my application.

Before logging in, I test the page. There are about ten session variables that are set in the global.asa -- that's the way the app was handed off to me. If I don't log in, and run my test script, I get this:

[HTML]
10 Session Variables are set.

ApplicationQS =
ApplicationQSFo rmer =
QSCount = 0
PageId =
TopBannerImage = images/general.png
HexColor = reg-text.css
Footer = default.txt
IsRoot = True
ErrMsg =
FullPageUri = http://domain.tld/
[/HTML]

These are all intended for the front end of my CMS, but appear here. Okay...

I log in, and test the set SVs. I get:

[HTML]
4 Session Variables are set.

RoleId: 1
UserId: 37
UserName: jfriesen
LoggedIn: true[/HTML]

The previous SVs are gone; all we have right now are the login SVs. All good. So I go into my application and fiddle around.

Some bits of the application will call a function from functions.asp, which will run a database query from dataAccess.asp and return values to the function, which will then set some session variables and close the recordset call. The page will then use those session variables through the page. I've set the page to eliminate those temporary session variables at the end of the page. But usually it works with 8 SVs.

Sometimes when I work with that page, and go back and test what SVs are set, I see some of the login SVs, and some of the global.asa SVs, and a couple of the page ones.

But the real kicker is when it gets into a situation where the login SVs vanish. But if I refresh the page, they return. Refresh again, gone. Refresh again, they're back.

I'm tearing out my hair... ideas?

j
Aug 8 '06 #1
0 1804

Sign in to post your reply or Sign up for a free account.

Similar topics

7
7776
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?
9
4699
by: Jimmy Junatas | last post by:
When we open a window (using client-side jscript ie. window.open("/Site/Popup.aspx?...",...)) from Page1.aspx, the called page Popup.aspx does not have access to the Session variables present in Page1.aspx. The IIS Log shows (listed below) shows that the ASP.NET_SessionId cookie is not present in Popup.aspx. The thing is that this...
5
5261
by: fbwhite | last post by:
I know this issue has been brought up many times, but I have tried many of the solutions to no avail. I wanted to give my specific case to see if someone could be of any help. We are using the sessionstate inproc mode and users are randomly losing their session. I do not believe it is happening across all users at one time. It seems to...
3
1974
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
2
1441
by: Wim Geukens | last post by:
All, We're experiencing a very strange session variable problem. We've got a running version of our site at www.mysite.com, which points to c:\mysite in IIS 5 This same site is also reachable via test.mysite.com, because we specified it in the "Advanced multiple Web Site configuration" dialog box. So it's basically the same website. ...
10
1361
by: julian_m | last post by:
i'm finishing my 2nd php project. It's a sort of catalog and I used css/mysql as well. All the functionality of the site is mainly beacause the great number of arguments I pass to every page on the address bar. For example *number of items to display *categories *brands *user_id *price interval *...
9
2091
by: Schraalhans Keukenmeester | last post by:
I am stomped with the following problem: I have a script start.php and a second script proceed.php Relevant (and working) sections of the code: start.php <?PHP start_session();
22
3144
by: magic_hat60622 | last post by:
Hi all. I've got an app that dumps a user id into a session after successful login. the login page is http://www.mydomain.com/login.php. If the user visits pages on my site without the www (i.e., http://mydomain.com/foo.php), the session works fine and login state is maintained. If he visits http://www.mydomain.com/foo.php, the app drops...
3
4012
by: at_the_gonq | last post by:
Hello, I am hoping to get some guidance on the following scenerio: I have a password protected site where users have various permissions. Are sessions the best way of storing the user's id? And if so, on load of a page should I be hitting the database for their permissions (based on the session stored user id), or should everything I...
0
7941
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7452
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...
0
7784
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...
1
5354
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...
0
3485
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...
0
3467
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1916
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
1
1039
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
738
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...

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.