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

x
?
Solved

Seesion Expire

Posted on 2004-08-26
8
Medium Priority
?
250 Views
Last Modified: 2010-04-23
How do I set the session to expire in vb.net
thank you
0
Comment
Question by:yalamanchir
[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
  • 2
  • 2
  • 2
  • +1
8 Comments
 
LVL 7

Expert Comment

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

Accepted Solution

by:
gregoryyoung earned 2000 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
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!

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

721 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