title: Can you set request timeout in asp.net core 2.0 hosted in IIS from C# code?
body: <p>Is there a way to set <code>requestTimeout</code> from C# instead of needing to set <code>requestTimeout</code> in the <code>web.config</code>?</p>
  
  <p>asp.net core 2.0 hosted in IIS</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;system.webServer&gt;
      &lt;handlers&gt;
        &lt;add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" /&gt;
      &lt;/handlers&gt;
      &lt;aspNetCore requestTimeout="00:00:04" processPath="dotnet" arguments=".\Foo.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" /&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p><a href="https://stackoverflow.com/a/38507709/1228889">Not like this</a></p>