Control does not come back to the awaited webClient after calling Async WebAPI

Viewed 1071

We have a Restful Client-Sever environment and I am trying to debug my code where client code looks like following:

await Client.DoWork(Id);

While server code looks like following:

 public virtual async Task<IActionResult> DoWork(long Id)
 {
     return Ok();
 }

Please note that the client is a webclient for the service which is auto-generated from https://github.com/swagger-api/swagger-codegen code.

The point in auto-generated code that it never comes back looks like like below:

var response_ = await client_.SendAsync(request_,
    System.Net.Http.HttpCompletionOption.ResponseHeadersRead,
    cancellationToken).ConfigureAwait(false);

This is where the control is gone

  • One thing which may or may not be helpful here is that the service calls are going through a proxy. Not sure if that changes anything

When Client call the API I can see it goes to Return OK() and I see in Fiddler that it did return 200OK but control never comes back to calling method. How can I solve this?

1 Answers
Related