473,725 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting the Session timeout for a specific page.

UJ
I have a page where the user can upload a video file. As you can guess, this
may take a while. Is there a way I can change the session timeout for just
this one page? I would also want to change the forms authentication to be a
large value for that page also.

TIA - Jeff.
Aug 25 '06 #1
4 9451
You can set the Session Timeout time, in minutes, in code, in any page.

Session.Timeout [=nMinutes]

Example :

Session.Timeout = 40

The Page_Load event is a good place to set this.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"UJ" <fr**@nowhere.c omwrote in message news:Oe******** ******@TK2MSFTN GP05.phx.gbl...
>I have a page where the user can upload a video file. As you can guess, this may take a while. Is
there a way I can change the session timeout for just this one page? I would also want to change
the forms authentication to be a large value for that page also.

TIA - Jeff.



Aug 25 '06 #2
But that sets the timeout for this session, not just for this page.

You can't set the session timeout for a specific page, as the session
applies to all requests used in this session,

Kevin Jones

Juan T. Llibre wrote:
You can set the Session Timeout time, in minutes, in code, in any page.

Session.Timeout [=nMinutes]

Example :

Session.Timeout = 40

The Page_Load event is a good place to set this.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"UJ" <fr**@nowhere.c omwrote in message news:Oe******** ******@TK2MSFTN GP05.phx.gbl...
>I have a page where the user can upload a video file. As you can guess, this may take a while. Is
there a way I can change the session timeout for just this one page? I would also want to change
the forms authentication to be a large value for that page also.

TIA - Jeff.



Aug 28 '06 #3
re:
But that sets the timeout for this session, not just for this page.
Correct.

re:
You can't set the session timeout for a specific page,
as the session applies to all requests used in this session,
Correct, too.

I did not state, or imply, that the setting applies to individual pages, did I ?

"You can set the Session Timeout time, in minutes, in code, in any page"

Saying that you can *set* a Session's duration in any page is not the
same as saying that the Session's duration applies only to that page.

If the statement was : "You can set the Session Timeout time, in minutes, in code, *for* any page",
then it would mean that the Session's duration applies only to that page.

However, in retrospect, I suspect that Jeff also needs to change the
executionTimeou t and maxRequestLengt h values, besides the Session.Timeout value.

If he does't want his video upload interrupted
because of the page timing out, he should set :

<httpRuntime executionTimeou t="NumberOfSeco nds" />

to a sufficiently large value ( longer than what the file will take to upload ).

He should probably also change the httpRuntime's maxRequestLengt h:

<httpRuntime
maxRequestLengt h="MaxNumberOfK ilobytes"
/>

<httpRuntime
maxRequestLengt h="4096"
/>
....is the default, and stands for 4MB max file size.

Jeff will probably need a much higher value, if he's accepting video files.

So, he should set them like this :

<httpRuntime
executionTimeou t="NumberOfSeco nds"
maxRequestLengt h="MaxNumberOfK ilobytes"
/>

Additionally, he should increase the Session duration to the time needed
to upload the largest file he expects to be uploaded, if the user isn't going
somewhere else when the file upload finishes :

<sessionState
timeout="Howeve rLongItTakesToU ploadTheLargest File"
/>

That's an integer which stands for minutes.

Example for 60 minutes :

<sessionState
timeout="60"
/>

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Kevin Jones" <kj**********@d evelop.comwrote in message
news:Ok******** ******@TK2MSFTN GP06.phx.gbl...
But that sets the timeout for this session, not just for this page.

You can't set the session timeout for a specific page, as the session applies to all requests used
in this session,

Kevin Jones
Juan T. Llibre wrote:
>You can set the Session Timeout time, in minutes, in code, in any page.

Session.Timeou t [=nMinutes]

Example :

Session.Timeou t = 40

The Page_Load event is a good place to set this.


Juan T. Llibre, asp.net MVP
aspnetfaq.co m : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
============== =============== ======
"UJ" <fr**@nowhere.c omwrote in message news:Oe******** ******@TK2MSFTN GP05.phx.gbl...
>>I have a page where the user can upload a video file. As you can guess, this may take a while.
Is
there a way I can change the session timeout for just this one page? I would also want to change
the forms authentication to be a large value for that page also.

TIA - Jeff.


Aug 28 '06 #4
I did not state, or imply, that the setting applies to individual
pages, did I ?

The question was:

"Is there a way I can change the session timeout for just this one page? "

So yes (IMO) your answer did imply this. I just want to make sure that
Jeff was aware that this wasn't the case,

Kevin

Juan T. Llibre wrote:
re:
>But that sets the timeout for this session, not just for this page.

Correct.

re:
>You can't set the session timeout for a specific page,
as the session applies to all requests used in this session,

Correct, too.

I did not state, or imply, that the setting applies to individual pages, did I ?

"You can set the Session Timeout time, in minutes, in code, in any page"

Saying that you can *set* a Session's duration in any page is not the
same as saying that the Session's duration applies only to that page.

If the statement was : "You can set the Session Timeout time, in minutes, in code, *for* any page",
then it would mean that the Session's duration applies only to that page.

However, in retrospect, I suspect that Jeff also needs to change the
executionTimeou t and maxRequestLengt h values, besides the Session.Timeout value.

If he does't want his video upload interrupted
because of the page timing out, he should set :

<httpRuntime executionTimeou t="NumberOfSeco nds" />

to a sufficiently large value ( longer than what the file will take to upload ).

He should probably also change the httpRuntime's maxRequestLengt h:

<httpRuntime
maxRequestLengt h="MaxNumberOfK ilobytes"
/>

<httpRuntime
maxRequestLengt h="4096"
/>
...is the default, and stands for 4MB max file size.

Jeff will probably need a much higher value, if he's accepting video files.

So, he should set them like this :

<httpRuntime
executionTimeou t="NumberOfSeco nds"
maxRequestLengt h="MaxNumberOfK ilobytes"
/>

Additionally, he should increase the Session duration to the time needed
to upload the largest file he expects to be uploaded, if the user isn't going
somewhere else when the file upload finishes :

<sessionState
timeout="Howeve rLongItTakesToU ploadTheLargest File"
/>

That's an integer which stands for minutes.

Example for 60 minutes :

<sessionState
timeout="60"
/>

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Kevin Jones" <kj**********@d evelop.comwrote in message
news:Ok******** ******@TK2MSFTN GP06.phx.gbl...
>But that sets the timeout for this session, not just for this page.

You can't set the session timeout for a specific page, as the session applies to all requests used
in this session,

Kevin Jones
>Juan T. Llibre wrote:
>>You can set the Session Timeout time, in minutes, in code, in any page.

Session.Timeo ut [=nMinutes]

Example :

Session.Timeo ut = 40

The Page_Load event is a good place to set this.


Juan T. Llibre, asp.net MVP
aspnetfaq.c om : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
============= =============== =======
"UJ" <fr**@nowhere.c omwrote in message news:Oe******** ******@TK2MSFTN GP05.phx.gbl...
I have a page where the user can upload a video file. As you can guess, this may take a while.
Is
there a way I can change the session timeout for just this one page? I would also want to change
the forms authentication to be a large value for that page also.

TIA - Jeff.


Aug 28 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2891
by: Scott Walters | last post by:
Hi, I have an asp.net webapp that uses some javascript in a hidden frame on the browser to poll the server every 30 seconds, using an http post. I also want my sessions to timeout in the normal fashion. The way I'm trying to get around this is by manually setting the timeout property for the session. I cache the starting session timeout value and inspect each url I get.
3
2120
by: Jim Heavey | last post by:
I am wanting to find out a way to timeout my session This issue is that the user retrieve data from a datatable and that data get stale over time, so after 20 minutes, I want to be able to tell the user that their session has timed out and they will need to refresh their data I set the session time out in the web config file to 20 minutes, but this does not seems to have no effect. The user is still able to retrieve data and leave that data...
4
15466
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site | Properties | Configuration | Options | Enable Session State Session timeout 20 (3) within Global.asax.vb file - Session_Start subroutine can use Session.Timeout=x minutes or (4) within any web page, i.e., <web page>.aspx can use...
9
2545
by: Adrian Parker | last post by:
We have a website that works everywhere but on a few PCs on this one site.. Asp.Net 1.1 Server = Windows 2003 Client = XP In the web.config we use - cookieless="false" in the browser settings they have "Always allow session cookies" set to true When the browser connects to the website the first page sets a session variable called "user_ref" to something and then calls another page. If on
6
16443
by: somaboy mx | last post by:
Hello I need people to be able to complete long text blocks in my cms before their session times out. From the php documentation I gather that ini directive session.gc_maxlifetime would be the one to adjust here. I am on shared hosting, so I can't change the php_ini settings directly. If I use ini_set, should I do that on every page in my cms, or would it suffice to do it on the login page? Or could I do it in a .htaccess file (which...
4
1890
by: Not Me | last post by:
Hi, I have a set of pages that use forms authentication for access. There are times when one of the session objects I'm using appears to disappear. The session is not timing out, however. (if I go to a page that doesn't use that specific object it works fine and I'm not redirected to the login page) Apologies if I'm using the incorrect terminology.. the session object I'm using is a class of my own, which features several private...
1
6500
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting" setting to be "E_ALL", notices are still not getting reported. The perms on my file are 664, with owner root and group root. The php.ini file is located at /usr/local/lib/php/php.ini. Any ideas why the setting does not seem to be having an effect? ...
1
1671
by: Mufasa | last post by:
Is there a way to set the timeouts for inactivity to be specific for a specific page? My memory is the answer is no. I have a script that is on every page at the moment that after twenty minutes of inactivity automatically logs you out. I can turn that off for the specific page but I assume I'll lose my session variables and what not at the timeout.
6
3779
by: ChrisAtWokingham | last post by:
I have been struggling with unexpected error messages on an ASP.NET system, using SQL and C#. The application draws organisation charts, based on data stored in the SQL database. Some of the chart editing processes place a very heavy load on the server as the effects of the edit ripple through the organisation structure, requiring potentially large numbers of rows in one of the tables to be updated. (I have done it this way to make the more...
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9179
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8099
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3228
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.