title: How to set different Timeouts for different URLs in ASP.NET
body: <p>I want different connection limits for some URLs in my application. Some URLs accept file uploads and need to have a large Connection Timeout. All other URLs need a much smaller timeout to prevent denial of service and not waste resources.</p>
  
  <p>Currently I have the Connection Timeout property in IIS set for the entire site to 60 minutes. Then I did this in the web.config:</p>
  
  <pre><code>&lt;system.web&gt;
      &lt;httpRuntime executionTimeout="480" maxRequestLength="1024" /&gt;
  &lt;/system.web&gt;
  
  &lt;location path="FileUpload/WriteFile.rails"&gt;
      &lt;system.web&gt;
          &lt;httpRuntime executionTimeout="3600" maxRequestLength="512000" /&gt;
      &lt;/system.web&gt;
  &lt;/location&gt;
  </code></pre>
  
  <p>So i was hoping this would set all URLs to an 8 minute timeout and allow the WriteFile.rails URL to run for 60 minutes. Instead ALL URLs are allowed to run for 60 minutes. How do I get IIS to do what I want?</p>