当前位置首页 > IIS知识

NETCore应用程序IIS运行报错502.3-Gateway

阅读次数:236 次  来源:admin  发布时间:

转自:http://www.zmland.com/forum.php?mod=viewthread&tid=941

将 NET Core 应用程序部署在 IIS 环境,默认配置下,如果任务执行时间长达 2 分钟,会收到如下错误(Bad Gateway):

如果要执行长时间任务,可以修改发布后的 web.config 文件的 system.webServer / aspNetCore 节,为其添加 requestTimeout 属性:

<system.webServer>
  <aspNetCore requestTimeout="00:20:00" ... />
</system.webServer>

属性说明:

requestTimeout

可选的 timespan 属性。

指定 ASP.NET 核心模块将等待侦听 %aspnetcore_port%的进程的响应的持续时间。

默认值为“00:02:00”。

requestTimeout 必须指定整分钟数,否则它将默认为 2 分钟。 参考 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 server terminated the proce

https://stackoverflow.com/questions/39756042/net-core-publish-to-iis-http-error-502-3-bad-gateway-the-specified-cgi-ap/48164725#48164725
上一篇:Linux学习4-阿里云服务器(CentOS)下使用Tomcat安装Jenkins
下一篇:CentOS下安装JDK7转载CentOS下安装JDK7