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

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

问题描述

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

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

我也加了:

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

然而,我仍然得到超出最大请求长度的异常。我错过了什么吗?还有其他的东西我可以试试吗?

谢谢!

解决方案

不幸的是,这是不可能的。除了API应用程序的限制之外,对于ASP.NET应用程序的网关也是有限制的。您可以更改您的API应用程序,但不能更改网关。



我知道这个团队正在考虑提供一个解决方案,但是我现在还没有一个ETA可以共享。


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>

I have also added:

<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?

Thanks!

解决方案

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天全站免登陆