1

I have a angular application that working with net core 3 backend api.

In the production environment an http request (if request takes more than 2 minutes) get "(failed)net::ERR_FAILED" at network status after 2 minutes and at console screen application thrown and CORS error when only http request failed.

from origin 'http://abc.qwer.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

But in the development environment I don't have any of these issues.

Net core web api running on IIS.

Is this a timeout problem ? Any idea how to resolve it ?

enter image description here

Yunnosch
  • 26,130
  • 9
  • 42
  • 54
S. Aziz Kazdal
  • 1,126
  • 3
  • 16
  • 40

1 Answers1

0

SOLVED :

if you use IIS as proxy and hosting net core api or web application behind it you should check web.config file. If your request takes longer tahen default timeout value which 2 min. then add requestTimeout value to web.config file.

https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/web-config?view=aspnetcore-5.0

S. Aziz Kazdal
  • 1,126
  • 3
  • 16
  • 40