>
> Are the calls on the same server? If so remove the async await, from the
> call and try again, did you get an error?
>

Yesterday I gave up and used a synchronous WebClient.DownloadString inside
the WebApi controller and it worked fine.

Today as an experiment I rejigged the code a bit. I made the controller
method async Task<IHttpActionResult> and inside it I created two Task using
await WebRequest Task.Factory.FromAsync(beginxx,endxx). I did a WhenAll on
the two tasks and they all worked fine.

One call was to localhost where I was debugging and the other to a remote
server. So today this has disproved my theory (like you had) that debugging
and calling localhost was a problem. Today it all just works!

It opens up philosophical questions about where in the WebApi call stack
should the asynchrony start and stop. Web searches find lots of often
contradictory arguments and advice on this matter.

*GK*

Reply via email to