Solved

Session variables lost

Posted on 2008-10-06
4
141 Views
Last Modified: 2012-05-05
I have a web app that with some users the session variables always return null almost right away after setting them. In this case I have 15 users and only one has this problem. Does anyone know a way to store values that can be called at any time for just that one user during that session without using session variables? Public shared variables span across all users right?
0
Comment
Question by:jimseiwert
  • 3
4 Comments
 
LVL 10

Expert Comment

by:MoreHeroic
ID: 22649352
Well, what is different about this one user?  That's where I would start.  My guess is that they aren't storing the asp.net session cookie.  Why not try adding the site as a trusted site for the one user, or maybe check out cookieless app settings.
0
 
LVL 10

Expert Comment

by:MoreHeroic
ID: 22649365
Here is a little more information about cookieless configuration:

http://msdn.microsoft.com/en-us/library/aa479315.aspx
0
 
LVL 13

Expert Comment

by:TechTiger007
ID: 22651059
Session variables are stored in server memory so it will not be affected by the browser settings.
Check the name of the session variable used to set and retrieve the value.. If you want non session solution you could use

hidden control in the page,
query string or
cookies

0
 
LVL 10

Accepted Solution

by:
MoreHeroic earned 500 total points
ID: 22651689
If you really want something that will let you store off variables that every user will have access to ("Public shared variables span across all users right?") you should look at the application object and the cache object:

http://support.microsoft.com/kb/309018

Something per session per user would make sense in the session variable as long as your not trying to replace a database with the session variables.  Then you would run into an issue with memory footprint being too large.  Anyway, the reason I would look at the one individual's machine is because they are the only individual who is experiencing difficulties, and their browser settings could affect .Net's ability to track the user between requests which would manifest itself as lost session variables.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question