Solved

Session.Contents Values forgotten after a period of time

Posted on 2014-09-04
3
266 Views
Last Modified: 2014-09-05
I've written a utility to assist my corps DBA's in managing User Access, in order to do this some users who don't have administrative privileges to the DB are provided w/ a pass-thru ID and password.  I save these values in 'Session.Content("Var")' variables when the user initially logs in but it seems that after a period of say 10-20 minutes of non-use the values are "forgotten."  Basically after this period the variable is null or blank and therefore when I try to connect to the database using it I get an error saying that the value is invalid.  Is there any way to store these variables securely and insure that they won't be forgotten after a period of time?  Thanks.
0
Comment
Question by:EDW_Gideon
3 Comments
 
LVL 15

Expert Comment

by:ChloesDad
ID: 40304655
You can save them in a cookie and put an expiry date on the cookie of say 1 hour (or whatever you feel is appropriate. They should time out eventually, as keeping them permanently is not a good idea.
0
 
LVL 12

Accepted Solution

by:
Ramkisan Jagtap earned 500 total points
ID: 40305131
You can increase the session timeout in the web.config Something like:

<configuration>
  <system.web>
     <sessionState timeout="20"></sessionState>
  </system.web>
</configuration>

 where you can "timeout" time as per your convinience
0
 

Author Closing Comment

by:EDW_Gideon
ID: 40306035
AWESOME!  Thank you Ramkisan!!!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

706 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

13 Experts available now in Live!

Get 1:1 Help Now