Solved

Session.Contents Values forgotten after a period of time

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

785 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