4

I am trying to increase the request timeout for a specific controller in a .Net core application, but the only way I can find to do it is increasing the requestTimeout globally in the web.config by doing this.

  <system.webServer>
    <handlers>
      <remove name="aspNetCore"/>
      <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" />
  </system.webServer>

In ASP 4 it was possible to specify the timeout programmatically in a controller/action, but I haven't found this inside .Net Core.

HttpContext.Current.Server.ScriptTimeout = 1200;

My question is, is there a way to set the timeout programmatically inside an action / controller in ASP.NET core?

1
  • 2
    No, ASP.NET Core has no in process request timeout, there's only the IIS/web.config timeout. Commented Jul 11, 2017 at 5:05

1 Answer 1

0

No, there is no way to set the timeout programmatically in specific controller or action.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.