Alex
Alex

Reputation: 1322

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!

Upvotes: 5

Views: 3385

Answers (1)

Panos
Panos

Reputation: 1973

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.

Upvotes: 1

Related Questions