Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase the maximum request length in a Azure Api App

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!

like image 894
Alex Avatar asked Nov 10 '22 09:11

Alex


1 Answers

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.

like image 181
Panos Avatar answered Nov 14 '22 21:11

Panos