请求机构太大。 [英] Request body too large.

查看:69
本文介绍了请求机构太大。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用托管PHP应用程序的Azure App Service Premium V2 Web App Linux发送31Mb zip文件后收到以下错误消息:


2019-02-04T18 :09:51.465551759Z请求管道中未处理的异常:System.Net.Http.HttpRequestException:发送请求时发生错误。 ---> Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException:请求主体太大。


看起来该文件甚至没有到达php服务,被某种规则阻止网络服务器或防火墙。


有人可以帮忙吗?

解决方案

它似乎是由于'M axRequestBodySize '允许的大小,结帐

KestrelServerLimits.MaxRequestBodySize Property
了解更多详情。
所以,为了隔离,您可以尝试在本地部署应用程序以查看它是否产生相同的行为。

要获取有关错误的更多详细信息,您还可以捕获网络跟踪。


查看以下链接了解更多详情:


https://github.com/aspnet/Announcements/issues/267

Linux上的应用程序服务常见问题解答




We are using the Azure App Service Premium V2 Web App Linux hosting a PHP application getting the following error message after sending a 31Mb zip file:

2019-02-04T18:09:51.465551759Z Unhandled exception in request pipeline: System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Request body too large.

It looks like the file doesn't even reach the php service, being blocked by some kind of rule on the web server or firewall.

Can someone help?

解决方案

It appears that it is due to ‘MaxRequestBodySize’allowed size, checkout KestrelServerLimits.MaxRequestBodySize Property for more details. So, just to isolate, you may try and deploy the app locally to see if it produces the same behavior.
To fetch more details on the error you could also capture a network trace.

Checkout the following links for more details:
https://github.com/aspnet/Announcements/issues/267
Azure App Service on Linux FAQ



这篇关于请求机构太大。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆