增加 Azure Api 应用程序中的最大请求长度 [英] Increase the maximum request length in a Azure Api App

查看:40
本文介绍了增加 Azure Api 应用程序中的最大请求长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个 Azure Api 应用程序,我将用它来上传文件.这些文件将 > 4mb,因此需要增加最大请求长度.我已将以下内容添加到 Web.config:

I have created an Azure Api App which I will use to upload files. These files will be > 4mb hence the need to increase the maximum request length. I have added the following to Web.config:

 <system.web>
    <httpRuntime executionTimeout="7200" targetFramework="4.5" maxRequestLength="2097152" />
  </system.web>

我还添加了:

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

但我仍然收到异常最大请求长度超出..我错过了什么吗?还有什么我可以尝试的吗?

Yet I still get the exception Maximum request length exceeded.. Am I missing something? Is there something else I can try?

谢谢!

推荐答案

很遗憾,目前还无法实现.除了 API 应用程序的限制外,网关也是一个 ASP.NET 应用程序.您可以更改 API 应用程序,但不能更改网关.

Unfortunately, this is not possible yet. Except the limitation on the API App, there is also a limitation on the Gateway which is an ASP.NET app as well. You can change your API App but you cannot change the Gateway.

我知道团队正在考虑为此提供解决方案,但我目前没有可分享的预计到达时间.

I know the team is looking into providing a solution to that but I don't have an ETA to share at this point.

这篇关于增加 Azure Api 应用程序中的最大请求长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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