Transferred from: http://www.zmland.com/forum.php?mod=viewthread&tid=941
Deploying the NET Core application in the IIS environment, under the default configuration, receives the following error if the task executes for up to 2 minutes (bad Gateway):
If you want to perform a long-duration task, you can modify the System.webserver/aspnetcore section of the published Web. config file to add the Requesttimeout property to it:
<system.webServer> <aspnetcore requesttimeout= "00:20:00" .../></system.webserver>
Property Description:
- Requesttimeout
The optional TimeSpan property.
Specifies the duration for which the ASP. NET Core module will wait for the response of the process listening on%aspnetcore_port%.
The default value is "00:02:00".
Requesttimeout must specify an entire number of minutes, otherwise it will default to 2 minutes.
Reference
- ASP. NET Core Module Configuration Reference
Https://docs.microsoft.com/zh-cn/aspnet/core/hosting/aspnet-core-module
- . NET Core Publish to Iis-http Error 502.3-bad gateway-the specified CGI application encountered an Error and the SER Ver terminated the process
https://stackoverflow.com/questions/39756042/ net-core-publish-to-iis-http-error-502-3-bad-gateway-the-specified-cgi-ap/48164725#48164725
NET Core Application IIS running error 502.3-gateway