executionTimeout

  • Thread starter Alphonse Giambrone
  • Start date
A

Alphonse Giambrone

Can executionTimeout be set at run time?
I need to increase it, to allow file uploads, but would prefer to only do it
when the upload page is requested.

TIA
 
S

Steven Cheng[MSFT]

Hi Alphonse,

As for the "executionTimeout" setting in the ASP.NET 's cofiguration, this
setting is only configurable before runtime in machine.config or web.config
file. In fact, the <httpRuntime> settings such as "executionTimeout" is not
only for fileupload scenarios , but all the http web requests will reply on
this setting, so this setting must be definite before runtime(any web
request occurs). And any modify(manually modify the confige file) on the
configuration(machine.config or web.config) will cause all the web
application or the certain web application recycle. So we're not able to
set it at runtime in code , also not recommended to modify it manually on
the config file. Do you think so? In addition, below is the reference on
the <httpRuntime> element in MSDN:

#<httpRuntime> Element
http://msdn.microsoft.com/library/en-us/cpgenref/html/gngrfhttpruntimesectio
n.asp?frame=true

Hope also helps. Thanks.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
A

Alphonse Giambrone

Thanks for the response Steven,

What do you mean by "not recommended to modify it manually"?
Since it can't be set at runtime, isn't modifying the web.config before
runtime, setting it manually?

The article you referenced states:
"This section can be declared at the machine, site, application, and
subdirectory levels."
Does this mean that I can leave the executionTimeout at default in the
app's web.config file, put my upload form in a subfolder with its own
web.config and set the executionTimeout for the subfolder to a greater value
to allow for upload time without affecting the rest of the app?
 
S

Steven Cheng[MSFT]

Hi Alphonse,

Yes, you can make a subdirectory which has a own web.config and put the
certain page which need particluar setting in the subdirectory. In
addition, the web.config file's schema also provide the <location> element
which can help to specify setting for a certain path (even a certain page).
For example, if you'd like to override the <httpRuntime> setting for just
one page(upload.aspx), you can apply the <location> element in the
web.config file as below:
<configuration>
<location path="upload.aspx">
<httpRuntime maxRequestLength="128"/>
</location>
</configuration>

Looks cool? :)

For detailed description on the <location> element, please refer to the
following reference in MSDN:
#<location> Element
http://msdn.microsoft.com/library/en-us/cpgenref/html/gngrfLocationElement.a
sp?frame=true

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

-------------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top