【问题标题】:Azure App Service limits body size to ~64kBAzure 应用服务将正文大小限制为 ~64kB
【发布时间】:2016-04-11 17:26:47
【问题描述】:

我在 Azure 上托管了 Node.js 应用程序。它是定价层“Default2(免费)”中的“Web 应用程序”。当我尝试发送大于 64kB 的 JSON 时,服务器返回 HTTP 错误 413(“请求实体太大”),正文为 Payload Too Large

在 Web.config 文件中设置此项没有帮助:

<configuration>
    <system.webServer>
        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="102400000" />
            </requestFiltering>
        </security>
    </system.webServer>
</configuration>

【问题讨论】:

    标签: node.js azure iis azure-web-app-service


    【解决方案1】:

    根据我的经验,我认为问题不是由 Azure IIS 的配置引起的。

    有两个已回答的 SO 主题似乎对您有帮助。

    1. 解决请求体过大的问题,请查看Error: request entity too large

    2. 解决请求头大小限制的问题,请参见nodeJS max header size in http.request

    希望对你有帮助。

    如有任何疑问,请随时告诉我。

    【讨论】:

      【解决方案2】:

      你可以试试 那:Node.js: how to limit the HTTP request size and upload file size?

      然后呢?

      <system.web> 
          <httpRuntime maxRequestLength="2097152"/> 
      </system.web>
      

      这两个都是过去类似问题的解决方案,所以请告知是否可行(或不可行)。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-11-28
        • 2021-02-25
        • 1970-01-01
        • 1970-01-01
        • 2017-11-27
        • 2011-11-20
        • 1970-01-01
        • 2019-10-14
        相关资源
        最近更新 更多