Solved

Session variables lost

Posted on 2008-10-06
4
140 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Showdialog 8 29
Help with deleting records by comparing two files using VB.NET 8 55
Help with LINQ and XML 10 25
Access to class from any project within a solution. 6 14
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
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…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
A short film showing how OnPage and Connectwise integration works.

948 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now