An error occurred while sending the request

LcdcDev's Avatar


18 Oct, 2023 03:59 AM


It is possible that there is a network issue with some of the appveyor workers? I tried to rebuild from a commit that was previously successful, but some of the tests that need to make an HTTP request are returning errors now:

System.AggregateException : One or more errors occurred.

----> System.Net.Http.HttpRequestException : An error occurred while sending the request.

----> System.Net.WebException : The request was aborted: Could not create SSL/TLS secure channel.

at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)

  1. Support Staff 1 Posted by Feodor Fitsner on 18 Oct, 2023 05:04 PM

    Feodor Fitsner's Avatar

    I can confirm both builds ran on the same virtualization host. It could be a hiccup on "that side".

    Are you still experiencing the issue? Try running with "Visual Studio 2019" or "Visual Studio 2022" images?

  2. 2 Posted by LcdcDev on 18 Oct, 2023 09:40 PM

    LcdcDev's Avatar

    Yes, I'm still experiencing the issue. I tried to use "Visual Studio 2019" and "Visual Studio 2022" images as well (via the UI), but it didn't fix the issue.
    I've also downloaded the logs and tried comparing them line by line with vscode's comparison tool, but couldn't find a real difference that would explain the error.

  3. Support Staff 3 Posted by Feodor Fitsner on 18 Oct, 2023 09:56 PM

    Feodor Fitsner's Avatar

    What URL are you trying to query?
    Is it erroring intermittently or all the time once started failing?

  4. 4 Posted by LcdcDev on 19 Oct, 2023 12:11 AM

    LcdcDev's Avatar

    I'm making requests to the Mailchimp API. The simplest case is if I try to do a ping at this address: "".

    Since the error has started to occur, it happens on every build.

    For instance, in the example test below, I send a ping and it works on my local computer. The only way I could replicate the error on my machine was to remove ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; which suggests to me that it's a network issue on the worker.

    using NUnit.Framework;
    using System.Net.Http;
    using System.Net;
    namespace CliniqueCoureur.Extensions.Tests
        class GetRequestCheck
            public void GetRequest_Should_Return()
                ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
                var httpClient = new HttpClient();
                var request = new HttpRequestMessage(HttpMethod.Get, "");
                var response = httpClient.SendAsync(request).Result;
                Assert.That(response.StatusCode == System.Net.HttpStatusCode.Unauthorized);
  5. Support Staff 5 Posted by Feodor Fitsner on 19 Oct, 2023 12:43 AM

    Feodor Fitsner's Avatar

    I've checked that URL on 3 images and it could be accessed without any issues - it doesn't look like connectivity issue:

    However, when trying to access the same URL on VS 2015 image from PowerShell (.NET) I'm getting TLS error:

    It's because VS 2015 image is based on Windows Server 2012 R2 and .NET Fx there doesn't have required ciphers.

    You saying you tried "Visual Studio 2019" and "Visual Studio 2022" image, but I don't see in the logs any builds run there. If you configure your project via appveyor.yml make sure image: Visual Studio 2019 is added in it - UI settings are ignored when YAML used.

  6. 6 Posted by LcdcDev on 19 Oct, 2023 03:40 AM

    LcdcDev's Avatar

    Ok, the current appveyor.yml was using os: Visual Studio 2015, so I changed it to os: Visual Studio 2017 and the HTTP requests aren't causing errors now.

    Can you confirm that the os and image keys are synonyms?

    Also, do you think it would be worth making this discussion public?

  7. Support Staff 7 Posted by Feodor Fitsner on 19 Oct, 2023 04:25 PM

    Feodor Fitsner's Avatar

    Thanks for the update!

    Correct, os and image are the same, image is "newer" and more common.

    You can make it public to help others, yes. I'd only recommend removing links to your builds (and any other "sensitive" information though I can't see it here) before doing that.

  8. 8 Posted by LcdcDev on 20 Oct, 2023 04:22 AM

    LcdcDev's Avatar

    Alright, Thanks for the help! I've made the discussion public.

  9. LcdcDev closed this discussion on 20 Oct, 2023 04:23 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac