Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 20th, 2008, 06:18 AM
Authorized User
 
Join Date: Jun 2008
Location: p, g, Malaysia.
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default timeout

hi, how to set the time out after specific time... example , after 15 minutes idle, it will require to redirect to login page to relogin...

 
Old July 21st, 2008, 09:09 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

This has to be done with client side code. You can not "push" a redirect to the browser without a request. You need to set a client side timeout event for the desired time limit, then use client code to navigate to the desired URL such as your logout/timeout page.

-Peter
compiledthoughts.com
 
Old July 22nd, 2008, 07:17 AM
Authorized User
 
Join Date: Jun 2008
Location: p, g, Malaysia.
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Can provide some client side code example? I try web.config time out but no work. Not sure what the proper way to set time out..

 
Old July 22nd, 2008, 08:53 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

http://www.google.com/search?q=settimeout

-Peter
compiledthoughts.com
 
Old August 3rd, 2008, 03:59 AM
Authorized User
 
Join Date: Jun 2008
Location: p, g, Malaysia.
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi, i put this code into web.config, it wont timeout and redirect to default.aspx page after 5 minutes.

<authentication mode="Forms">
      <forms name=".ASPXAUTH" loginUrl="Default.aspx" protection="All" timeout="5" path="/" requireSSL="false" slidingExpiration="true" cookieless="UseDeviceProfile" />

    </authentication>

Please help me to solve this problem.. Thank

 
Old August 3rd, 2008, 04:36 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Take a look at Peter's post in this thread. .NET doesn't do this for you automatically; you need to write client side code (with JavaScript or meta refresh tags) to accomplish this.

Cheers,

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.




Similar Threads
Thread Thread Starter Forum Replies Last Post
Session Timeout aspless Classic ASP Basics 1 February 21st, 2008 04:46 PM
Search timeout...... Snib Forum and Wrox.com Feedback 4 May 28th, 2007 06:00 AM
Timeout Expires bob_rainhail SQL Server 2000 18 October 17th, 2006 10:29 AM
session timeout bikki_suresh ASP.NET 1.0 and 1.1 Basics 0 October 10th, 2006 12:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.