ThreadAbortException when calling Task.Result
问题 I have the following code where I'm trying to make a request to a remote endpoint using HttpClient : using (var client = new HttpClient()) { client.BaseAddress = _serviceBaseAddress; Task<HttpResponseMessage> readResponseTask = client.GetAsync(relativeUri); readResponseTask.Wait(); using (var response = readResponseTask.Result) { if (response.StatusCode == HttpStatusCode.NotFound || !response.IsSuccessStatusCode) { return default(TResult); } Task<TResult> readContentTask = response.Content