473,386 Members | 1,758 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,386 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 9403
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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,...

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.