question

PraveenkumarK-2914 avatar image
0 Votes"
PraveenkumarK-2914 asked brtrach-MSFT commented

File upload above 30 MB is not working in angular application hosted in azure

I have tried to upload file above 30 MB till 100 MB but none of the files are uploading in angular application. Angular application hosted in Azure and below configuration files are used in code

in web.config inside configuration tag below settings are added

<configuration>
    <system.web>
        <!-- maxRequestLength for asp.net, in KB (100 * 1024) --> 
       <httpRuntime maxRequestLength="102400" ></httpRuntime> -- in kilo bytes
    </system.web>
    
    <system.webServer>
       <security>
           <requestFiltering>
              <!-- This will handle requests up to 100MB (100 * 1024 * 1024)-->
                 <requestLimits maxAllowedContentLength="104857600" /> --- in bytes
            </requestFiltering>
       </security>
    </system.webServer>
</configuration>


Configured 100 MB upload limit in both tag which has verified one of the blog says that both value should be matched so that 102400 KB and 104857600 bytes have referred 100 MB.

Whenever upload any files above 30MB till 100 MB the error says CORS Error. As per my understanding azure accepts all request..

117409-azure-error.png


azure-webapps
azure-error.png (25.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

brtrach-MSFT avatar image
0 Votes"
brtrach-MSFT answered

@PraveenKumar-2914 Thank you for the question.

Updating the web.config file was the correct action to take so it's strange that you're still receiving a CORS error.

Have you tried rebooting the web app to see if that might help force the web.config file to take effect?

If that does not work, please let us know and we will continue the investigation on our end. We look forward to your reply.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PraveenkumarK-2914 avatar image
0 Votes"
PraveenkumarK-2914 answered brtrach-MSFT commented

Hi,

Its done and working as expected.. The issue was changing web.config file in angular application instead backend web.config.. So again changed web.config in backend along with adding additional changes in CORS menu (like given value as "*") which has been specified in UI app service.. After done all changes restarting the application and worked as expected and upload 100 MB as well through angular application..

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for sharing the resolution with the community. We are happy to hear you were able to locate a solution.

0 Votes 0 ·