Fixed - Problem with a Web Api calling another Web Api

Asked

Viewed 136 times

1

I am beginner developing for web environment and I am with a very bizarre problem, so the text should stay long to try to explain it.

I have the following scenario: A front end made in Angular that calls a Web Api(1), this Web Api, in turn, in some cases calls methods in another Web Api(2). All methods work well with one exception.

One of these Web Api(1) methods when calling the method in the Web Api(2) takes a long time to receive a response, often falling by timeout. When I use Fiddler to directly call the method in the Web Api(2), it responds quickly.

Now it’s getting bizarre. I dropped the Web Api(2) to receive an error but although all other methods that call the Web Api(2) quickly receive a 404 error, this specific method takes a long time to receive this same error.

And it gets weirder and weirder. I created a method just to check if the Web Api(2) is online and call it before making the actual call of the method in Wab Api(2) and works great for everyone except for that my problem method. In it this method of checking has the same problem of delay to answer.

This problem occurs on the machine of all other developers accessing this Web Api on localhost, but does not happen in the production environment.

I believe the problem is at the local IIS, but as I’m beginner in this area I don’t know what to look at there. Does anyone have a light to give me? Thank you.

  • 1

    Can not help with this information, put the method that is presenting the problem

  • The problem was solved. The problem was occurring because the two Web Api were running on the same Application Pool on IIS. When I separated the Web Apis into different Application Pools the problem stopped occurring. Thank you very much.

  • I get it, could you post an answer with the explanation? That way, if someone has the same problem, you will be able to find a solution

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.