Solved

Seesion Expire

Posted on 2004-08-26
8
247 Views
Last Modified: 2010-04-23
How do I set the session to expire in vb.net
thank you
0
Comment
Question by:yalamanchir
  • 2
  • 2
  • 2
  • +1
8 Comments
 
LVL 7

Expert Comment

by:ramesh12
ID: 11904130
session.abandon
0
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 500 total points
ID: 11904155
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/asp12282000.asp explains well (and is a good overall article) ... if you look in your web.config  there is a line that looks like ..

<sessionstate
      mode="inproc"
      cookieless="false"
      timeout="20"
      sqlconnectionstring="data source=127.0.0.1;user id=<user id>;password=<password>"
      server="127.0.0.1"
      port="42424"
  />


change the value of the timeout="" field.
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 11904162
whoops I think I read the question wrong ... session.abandon is correct.
0
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.

 
LVL 7

Expert Comment

by:ramesh12
ID: 11904174
0
 
LVL 18

Expert Comment

by:DotNetLover_Baan
ID: 11904530
If you want to set a time for the session to expire...
Session.TimeOut = 5 'Will expire in 5 mins
0
 
LVL 28

Expert Comment

by:iboutchkine
ID: 11904817
DotNet
I thought that 5 min will be 5*60*1000 = 300000
or am I wrong?
0
 
LVL 18

Expert Comment

by:DotNetLover_Baan
ID: 11905500
nope... TimeOut property takes integer and set it in minutes... (not it milli seconds, as we have in Timer object)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebSessionStateHttpSessionStateClassTimeoutTopic.asp

-Baan
0
 
LVL 28

Expert Comment

by:iboutchkine
ID: 11907178
I probably got confused because in JavaScript it is in milliseconds. I am using

window.setTimeout("alert('you will be logged off in 5sec');",5000);
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

Title # Comments Views Activity
Crystal reports vb.net 2 54
Adding Existing Item to vb.net Project causes Errors 4 45
VB.NET 1 28
VB.NET Textbox input validation 4 41
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

830 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