欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

ASP.NET CORE ... because it was not sent by the client at a minimum of 240 bytes/second.

程序员文章站 2024-02-20 09:34:22
...

问题:使用httpClient进行asp.net core 的api请求时出现the request timed out because it was not sent by the client at a minimum of 240 bytes/second.错误提示
解决:

 public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
            WebHost.CreateDefaultBuilder(args).UseKestrel(op =>
            {
                op.Limits.RequestHeadersTimeout = new TimeSpan(23, 59, 59);
                op.Limits.MaxRequestBodySize = null;
                op.Limits.MinResponseDataRate = null;
            }).UseStartup<Startup>();

相关标签: ASP.NET CORE