473,320 Members | 2,088 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,320 software developers and data experts.

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 9392
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.comwrote in message news:Oe**************@TK2MSFTNGP05.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.comwrote in message news:Oe**************@TK2MSFTNGP05.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
executionTimeout and maxRequestLength 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 executionTimeout="NumberOfSeconds" />

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

He should probably also change the httpRuntime's maxRequestLength:

<httpRuntime
maxRequestLength="MaxNumberOfKilobytes"
/>

<httpRuntime
maxRequestLength="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
executionTimeout="NumberOfSeconds"
maxRequestLength="MaxNumberOfKilobytes"
/>

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="HoweverLongItTakesToUploadTheLargestFile"
/>

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**********@develop.comwrote in message
news:Ok**************@TK2MSFTNGP06.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.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.comwrote in message news:Oe**************@TK2MSFTNGP05.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
executionTimeout and maxRequestLength 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 executionTimeout="NumberOfSeconds" />

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

He should probably also change the httpRuntime's maxRequestLength:

<httpRuntime
maxRequestLength="MaxNumberOfKilobytes"
/>

<httpRuntime
maxRequestLength="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
executionTimeout="NumberOfSeconds"
maxRequestLength="MaxNumberOfKilobytes"
/>

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="HoweverLongItTakesToUploadTheLargestFile"
/>

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**********@develop.comwrote in message
news:Ok**************@TK2MSFTNGP06.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.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.comwrote in message news:Oe**************@TK2MSFTNGP05.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
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...
3
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...
4
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...
9
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...
6
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...
4
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...
1
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"...
1
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...
6
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...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.