0

I have API and does the following task

  1. Read the file from blob (large file)
  2. Process it

For small file, requests pass successfully, But when the blob is large (that means processing time will be higher) I am getting the following error from azure app service

Error from Azure app Request Method: POST Status Code: 500 Referrer Policy: strict-origin-when-cross-origin

Access to XMLHttpRequest at '{apiurl}' from origin '{originurl}' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

But when tried from Postman and I am getting the following error.

Error from Postman 500 - The request timed out. The web server failed to respond within the specified time.

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
smith
  • 73
  • 1
  • 8
  • your question has been answered before. check this out: https://stackoverflow.com/questions/31942037/how-to-enable-cors-in-asp-net-core – Mohammad Mahdi Hosseinpour Mar 01 '22 at 09:22
  • @MohammadMahdiHosseinpour I have already enable the cors. But i am getting this error when request processing time is higher(processing big blob file) – smith Mar 01 '22 at 09:45
  • The server likely errors out for a reason other than a CORS issue. A 500 response may not contain the CORS response headers necessary for you to be able to read the response. Figure out why the server is responding with a 500. – jub0bs Mar 01 '22 at 10:08
  • [This official doc would be useful to you.](https://learn.microsoft.com/en-us/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services) – Jason Pan Mar 01 '22 at 13:13
  • Does the official doc useful to you ? If you have any concern about this issue, pls let me know. – Jason Pan Mar 02 '22 at 05:01
  • @JasonPan No. We are already configure the api for cors. I have understood one point that why i am getting 500 error because of a timeout by the server. So i have find out that i have add Keep-Alive header – smith Mar 02 '22 at 09:15
  • @smith So the issue has been solved by using Keep-Alive header ? – Jason Pan Mar 02 '22 at 09:17
  • @JasonPan no it did not solve. I am wondering i am getting CORS error when the blob is large, but not that CORS error is not from Azure storage i am getting CORS error from my api – smith Mar 02 '22 at 13:33
  • Pls click `Diagnose and solve problems` and I want check `Application Event Logs`. By the way don't forget hide sensitive info. – Jason Pan Mar 02 '22 at 13:36

0 Answers0