Albert
Albert

Reputation: 3689

Set global maxRequestLength value in web.config- for all pages

I currently have my web.config location section set up like this

<location path="page1.aspx">
  <system.web>
    <httpRuntime maxRequestLength="65536" executionTimeout="3600"/>
  </system.web>
</location>
<location path="page2.aspx">
  <system.web>
    <httpRuntime maxRequestLength="65536" executionTimeout="3600"/>
  </system.web>
</location>

 etc

with one entry for each page.

How can I set the maxRequestLength for all pages, instead of one at a time?

Upvotes: 2

Views: 5163

Answers (2)

Muhammad Akhtar
Muhammad Akhtar

Reputation: 52241

You can directly add under Configuration section , this will be set for all pages.

<system.web>
  <httpRuntime maxRequestLength="65536" executionTimeout="3600"/>
</system.web>

Upvotes: 3

Jaxidian
Jaxidian

Reputation: 13511

Do it in your base/parent <system.web> section.

Upvotes: 2

Related Questions