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

9
  • CORS issue need to be resolved from backend. Commented Aug 31, 2020 at 9:03
  • yes but I am getting CORS issue only one http request that if takes longer than 2 minutes. I have added the screen shot. Commented Aug 31, 2020 at 9:18
  • May me this is the answer for your question stackoverflow.com/questions/62296859/… Commented Aug 31, 2020 at 9:55
  • @SantoshShinde still same result Commented Aug 31, 2020 at 11:25
  • 1
    Please do not edit solution announcements into the question. Instead, create an answer or delete the question please. Commented Nov 15, 2020 at 10:09

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.