Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Session.Contents Values forgotten after a period of time

Posted on 2014-09-04
3
Medium Priority
?
297 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

670 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