Solved

Seesion Expire

Posted on 2004-08-26
8
245 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
 
LVL 7

Expert Comment

by:ramesh12
ID: 11904174
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.Net - For Loop Error 5 31
Getfiles in vb.net 28 42
Make all values in arrayist to titlecase+vb.net 23 27
Run a batch file when a Crystal Report is opened 5 12
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

929 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

11 Experts available now in Live!

Get 1:1 Help Now