您的位置:首页 > 编程语言 > ASP

在Asp.net core 中如何设置请求超时的时长

2017-08-20 11:54 801 查看
在网页程序运行需要较长时间运行的是时候,ASP.NET Core MVC会出现502 bad gateway请求超时情况。一般默认的超时时间都比较短,我们需要在 web.config 中配置一下。其中 requestTimeout 属性就是用来设置超时时长的。解决方案来自云端网客

<?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=".\logs\stdout" forwardWindowsAuthToken="false"/>
</system.webServer>
</configuration>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐