Solved

Session.Contents Values forgotten after a period of time

Posted on 2014-09-04
3
286 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

685 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