How to upload large files to Azure web apps without experiencing many client disconnect errors?

Marwa Abouawad 281 Reputation points Microsoft Employee
2020-12-18T22:21:31.597+00:00

Here is the repro scenario:

User is experiencing many client disconnect errors while uploading audio files to Azure web apps up to 6 MB.

The below method has caused many requests failing issues:

"iScribe.API.Controllers.DictationCTRL+d__22.MoveNext "

This is occurring when the user is attempting to upload an audio file.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,212 questions
0 comments No comments
{count} votes

Accepted answer
  1. Michelle Blum 811 Reputation points Microsoft Employee
    2020-12-21T07:31:33.087+00:00

    @MarwaAbouawad-5459 - Welcome to the Q&A platform.

    Azure Web Apps are more suitable for quick running APIs / responses. When trying to do file transfers that run more than ~30 seconds, the risk of failure is significantly high.

    In order to minimize risk of disconnect errors, a better way to upload large files would be using a SAS Key. An Azure Web App generates a storage blob's SAS Key with write access. This SAS Key can then be sent by the Web App to a browser and the browser will be used to upload the file directly into Azure Storage without involving the Web App in the upload path.

    There was a sample blog post for this published on Microsoft's techcommunity site, which I am linking here for reference: https://techcommunity.microsoft.com/t5/apps-on-azure/azure-storage-blob-upload-from-browser/ba-p/392687

    Hope this helps!

    0 comments No comments

0 additional answers

Sort by: Most helpful