| || |
Why Increase Request Timeout in ASP.NET Core Application?
Posted On: 26-Jan-2019 07:51
If your application using ASP.NET Core 2.0 API and hosted to an Azure App Service, then you might run into an issue where it takes a process request longer than two minutes to complete. You’ll typically get a 502 Bad Gateway error from IIS server with the following info:
If you check your diagnostic logfiles (i.e application insights or other server logs or nlog) then you may see:
In previous versions of ASP.NET MVC you can increase the timeout in your asp.net controller action.
But this doesn't exist in ASP.NET Core.
In ASP.NET Core, you can just add web.config to your project and specify this (and other) setting value:
If a web.config file does not present in the project, the file can be created with the correct processPath and arguments to configure the ASP.NET Core Module and moved to published output. In VS 2017, you can create web.config with default settings by add new items wizard and then uncomment the required settings.
Active User (2)