zoukankan      html  css  js  c++  java
  • ASP.NET Core MVC请求超时设置解决方案

    设置请求超时解决方案

    当进行数据导入时,若导入数据比较大时此时在ASP.NET Core MVC会出现502 bad gateway请求超时情况(目前对于版本1.1有效,2.0未知),此时我们需要在项目web.config配置文件中进行如下设置即可:

    <?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=".logsstdout" forwardWindowsAuthToken="false"/>
        </system.webServer>
    </configuration>

    我们需要如上设置 requestTimeout 属性即可解决问题。

  • 相关阅读:
    数据结构笔记(一)
    Distance dependent Chinese Restaurant Processes
    距离依赖中餐馆过程
    AOP技术-02
    AOP技术-01
    Oracle-06
    web-02-css01
    web-02-css
    web-01
    jQuery对ajax的支持
  • 原文地址:https://www.cnblogs.com/fei686868/p/9947200.html
Copyright © 2011-2022 走看看