Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

does ExecutionTimeout include file upload time?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andy Fish - 18 Sep 2007 11:53 GMT
Hi,

I am trying to investigate a problem reported by one of my users who
received a "System.Web.HttpException: Request timed out." error trying to
upload a large file into my asp.net 2.0 application.

I have seen several blog posts and other articles implying that the
ExecutionTimeout property includes the time taken to upload the file,
whereas I had been of the opinion that the execution timeout only started
ticking once the entire request had been received by the server, and my
recent experiments would seem to back this up.

Can anyone throw any light on this?

Andy
Andy Fish - 18 Sep 2007 13:40 GMT
ok I have done some more experiments and it seems that the execution timeout
does indeed include the time to upload the file

I would like to allow the user to upload large files if required, but I do
not want to just set the global ExecutionTimeout to some massiv value
because I think the default value is sensible for all other requests.

Is there any way to set the execution timeout differently on different
pages? or to override it programmatically for an individual HttpRequest
object ?

TIA

Andy

> Hi,
>
[quoted text clipped - 11 lines]
>
> Andy
Patrice - 18 Sep 2007 14:35 GMT
Try but AFAIK in classic ASP, the Server.ScriptTimeOut was initialized for
each request with the IIS default value. Changes to this value were only
valid for the duration of the current request.

Just try to set the value in page A and display the value in page B to
confirm (or not) that the behavior is the same in ASP.NET...

---
Patrice

> ok I have done some more experiments and it seems that the execution
> timeout does indeed include the time to upload the file
[quoted text clipped - 26 lines]
>>
>> Andy
Andy Fish - 18 Sep 2007 15:30 GMT
hmm, I just looked up the documentation

http://msdn2.microsoft.com/en-us/library/system.web.httpserverutility.scripttime
out.aspx


It says that ScriptTimeout only works when you have <compilation
debug="true"> in the web.config so it won't be an option for my production
application

Andy

> Try but AFAIK in classic ASP, the Server.ScriptTimeOut was initialized for
> each request with the IIS default value. Changes to this value were only
[quoted text clipped - 36 lines]
>>>
>>> Andy
Patrice - 18 Sep 2007 17:06 GMT
Have you tried ? Could it be something such as :
- the timeout is taken from the IIS application configuration
- you can still change this value programmatically ?

---
Patrice

> hmm, I just looked up the documentation
>
[quoted text clipped - 46 lines]
>>>>
>>>> Andy
Patrice - 18 Sep 2007 17:30 GMT
I make a quick test and it looks like :
- Server.ScripTimeOut is initialized to a default value with each request
- I'm able to change the value programmatically even when debug is false

So you should be able to change this value just in the upload page. It will
still have the default value in all other pages...
--
Patrice

> Have you tried ? Could it be something such as :
> - the timeout is taken from the IIS application configuration
[quoted text clipped - 54 lines]
>>>>>
>>>>> Andy
Andy Fish - 19 Sep 2007 17:45 GMT
thanks patrice and ben - I should be able to put my own handling in then :-)

Andy

> Have you tried ? Could it be something such as :
> - the timeout is taken from the IIS application configuration
[quoted text clipped - 54 lines]
>>>>>
>>>>> Andy
Andy Fish - 27 Sep 2007 10:52 GMT
just as a follow up

in my global.asax Application_BeginRequest handler I was able to test the
URL and reset Server.ScriptTimeout if the url is the file upload page,
otherwise leave it as the default

I verified that this all works perfectly

> thanks patrice and ben - I should be able to put my own handling in then
> :-)
[quoted text clipped - 59 lines]
>>>>>>
>>>>>> Andy
Ben Schwehn - 18 Sep 2007 18:22 GMT
> http://msdn2.microsoft.com/en-us/library/system.web.httpserverutility.scripttime
out.aspx

>
> It says that ScriptTimeout only works when you have <compilation
> debug="true"> in the web.config so it won't be an option for my production
> application

Hello Andy,

This is an error/typo in the documentation. ScriptTimeout is ignored (or
rather it's set to 30.000.000 seconds, around 350 days) when debug is
set to true, so that you can set breakpoints and do debugging etc
without having the page timeout.

Ben

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.