Timeouts with long running ASP.NET MVC Core Controller HTTPPost Method

Setting the RequestTimeout="00:20:00" on the aspNetCore tag and deploying the site will cause it not to timeout.

Issue now only occurs when running from Visual Studio debug mode but not in release mode.

Take note: In ASP.NET RTM the httpPlatform tag has been replaced with aspNetCore in the web.config

Example for ASP.NET Core

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
    </handlers>
    <aspNetCore requestTimeout="00:20:00"  processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
  </system.webServer>
</configuration>

Leave a Comment