473,396 Members | 2,093 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to get time of last request in asp.net

Hi,

How can I get time of last request Sent in asp.net.. Actually I want to set automatic Idle timeout. So I planned to compare this time with current. Please Help me. Other solutions are also invited..

Thanks in Advance.
Jul 20 '10 #1
4 2160
Frinavale
9,735 Expert Mod 8TB
The answer to this question depends on how you have implemented your project.

Did you use Session?
InProc Session, by default, times out after 20 minutes. You can handle the Session_End event (in the Global.asax file) to clean up any resources. Please note that it doesn't necessarily mean that the Session_End event is going to be executed after 20 minutes of the user being idle (when session expires)...the Session_End event is executed when the Session ID is recycled.

Check out this article on Sessions for more information.

If you aren't using session...then you'll have to tell us what you are using so that we can make suggestions.

-Frinny
Jul 20 '10 #2
Thanks for response.

Actually I am using cookies. My main objective is to redirect the user to login page, if the user idles around 20 minutes.
Jul 21 '10 #3
Frinavale
9,735 Expert Mod 8TB
Well, I think I'd use JavaScript to check the cookie ever 20 minutes to see if the cookie has indicated that the time has expired. I would redirect the user to the login page using JavaScript.

You could redirect the user server side but this can only happen if the user posts back to the website...

-Frinny
Jul 21 '10 #4
iohos
45
<system.web>

<sessionState timeout="30"></sessionState>

</system.web>



<system.web>

<sessionState timeout="30"></sessionState>

</system.web>
Jul 25 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Gerrit Holl | last post by:
Hi, I have a dictionairy containing DateTime objects as keys and integers as values. What would be the easiest way to create a simple plot of these, with a number axis versus a time axis? What...
8
by: Tom | last post by:
Hi I have an aspx page which has javascript to configure xmldata. I added breakpoint to the button method. When I click submit button, it did not go to those breakpoint and show the following...
2
by: wapsiii | last post by:
I have a form in which users must enter date and time. The users are spread out over several timezones and I'd like to load the form with the date/time of the current user. How do I get the...
4
by: Manuel | last post by:
I have a long function that needs to be done 1000 times. I'm multithreading it, but I don't want to load them up all at once, instead load them 10 at a time. So far the only way I can get it to...
7
by: y1799 | last post by:
Hi, I think that my question about setting(s) for the project. I need to debug DLL project. I used 2 recommendation from VC.Net: - set external program as a start program of my dll (at...
0
by: daniel.rolfe | last post by:
Hi All, I have a problem on some production servers where a particular page will postback and then never return. Eventually, the page will time out with a HttpException "Request Timed Out"...
8
by: cyberbless | last post by:
I'm creating a basic page like the on below. Problem is evertime I refresh the page or spawn a "child window" out of the pre-existing browser the Session object is recreated with a new sessionID. ...
4
by: Michael Kujawa | last post by:
I am using the following to create an SQL statement using the names and values from request.form. The loop goes through each item in request.form The issue comes in having an additional "and" at...
6
by: DaveOnSEN | last post by:
Every time I make any .NET framework based webservice consumer I have the same problem: The first call my application makes to consume a webservice takes about 15 seconds. Subsequent calls are...
7
by: samthemist | last post by:
#/usr/bin/perl -w use LWP::UserAgent; use Time::HiRes qw(gettimeofday); #use Crypt::SSLeay; use strict; print "Enter URL to Time GET request for... "; my $host=<STDIN>; chomp $host;
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.