title: Azure Functions - Microsoft.AspNetCore.Server.Kestrel.Core: Request body too large
body: <p>I am trying to post large file to azure functions which is written in visualstudio Code platform. when i tried to upload less than 28Mb, it was successful. beyond that i am getting exception <strong>Microsoft.AspNetCore.Server.Kestrel.Core: Request body too large</strong>. Tried using RequestSizeLimit, DisableRequestSizeLimit attributes, but no use.
  Following is the code written in VS code</p>
  
  <pre><code>public static async Task Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)]HttpRequestMessage req)
      {
              var provider = new MultipartMemoryStreamProvider();
              await req.Content.ReadAsMultipartAsync(provider);
              var file = provider.Contents.First();
              var fileInfo = file.Headers.ContentDisposition;
              var fileData = await file.ReadAsByteArrayAsync();
      }
  </code></pre>
  
  <p>And i am calling above function from angular6. I tried looking into the following doc and unable to implement in azure function
  [<a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.server.kestrel.kestrelserverlimits?view=aspnetcore-1.1][KestrelServerLimits" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.server.kestrel.kestrelserverlimits?view=aspnetcore-1.1][KestrelServerLimits</a> Class] 
  Please let me know if there is direct setting to allow large data or any other work around. Thanks in advance.</p>