Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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 August 10th, 2004, 11:50 PM
Authorized User
 
Join Date: Aug 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vempativenu
Default Session Remaining Time Out

HI

   I would greatly appreciate if anyone can suggest solutions to my current problem.
I need to know how to get Session remaining Time out in ASP.net.It seems ASP.NET Contains one property Session.timeout for knowing Session time out which contains in web.config file.But i need to know Session remaining time out.

Please let me know for any suggestions / solutions.Thanks.

Bye
__________________
Bye
 
Old August 12th, 2004, 09:34 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I know of no way to ask a particular session how long it will be until it times out. In reality, every time you touch the session, it resets.

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old August 12th, 2004, 01:25 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Yes, as Hal says. As soon as the request is made, if the session hasn't already timed out, it is reset, so therefore the "current time left" will always = the timeout.

Are you attempting to achieve something on the client side to warn them about the impending timeout? For that, use some javascript to count down the timeout value.
 
Old August 13th, 2004, 12:40 AM
Authorized User
 
Join Date: Aug 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vempativenu
Default

You both are currect. What is my problem is Whenever client is filling one large application he may be stilling filling the form when Session is going to expire. In this case there wouldn't be any requests. In that case I want to reset the Session even before Session timed out so that client can get enough time to fill the application and submit the form.

Please let me know for any suggestions / solutions.Thanks.


Bye
 
Old August 13th, 2004, 07:57 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

I had a long form and I split it into 3 forms using panels. I put 1/3 of the form in each panel. When the user clicked 'Continue' I hid the current panel and made visible the next one. I also added a 'Previous' button that did the same going backwards.

 
Old August 13th, 2004, 09:26 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

You can also use a tab control, if you like how that looks, to do the same thing.. and save when they tab to different "pages"

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old August 14th, 2004, 12:48 AM
Authorized User
 
Join Date: Aug 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vempativenu
Default

That could solve my problem. What I am thinking is when user sits idle for some time or he may be busy with the other websites for some time and he restarting to fill my web page Session may time out.In that case user may feel discomfort.Is there any way in asp.net we can reset the session without requesting the Server or without clicking the buttons or tabs? Something like this Session.reset or using javascript.Ofcourse it wouldn't work Is there any way i can achieve this.
Regards,
venu

Bye
 
Old August 15th, 2004, 09:51 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Quote:
quote:Originally posted by vempativenu

Is there any way in asp.net we can reset the session without requesting the Server or without clicking the buttons or tabs?
If there were, that would essentially negate the whole point of session expiration. If the user is idol, the session expires.

You need to create a means of "simulating" activity. The simplest way I would go about this is to create a page frameset, put your form in a frame that is visible (100%) and a "refresher" page in the other frame that is invisible (0%). The refresher page will have a standard HTML meta refresh header tag that refreshes the page at some interval (5 minutes perhaps). This will cause the session to stay active without user action.
 
Old August 16th, 2004, 12:50 AM
Authorized User
 
Join Date: Aug 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vempativenu
Default

Hi
  Thanks for your suggetion.That will solve my problem

Bye
 
Old August 16th, 2004, 09:19 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Ugh....


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee





Similar Threads
Thread Thread Starter Forum Replies Last Post
session time out info nasirmunir PHP How-To 1 August 22nd, 2008 03:07 PM
How to view remaining months using age(timestamp)? ray_noel Forum and Wrox.com Feedback 1 July 17th, 2006 01:33 PM
Printing Remaining... NitinJoshi General .NET 6 January 6th, 2005 07:26 AM
session time out lily611 General .NET 10 August 9th, 2004 08:51 AM





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