Skip to content

Can't open connection to https://dir.xiph.org and download xml file /yp.xml System.ComponentModel.Win32Exception (0x80090331): The client and server cannot communicate, because they do not possess a common algorithm. #25

Description

@borrelnoten

Hi,

thank you for building this package! I'm trying to use it and download a 4Mb xml file from this ICE cast server:

https://dir.xiph.org/yp.xml

I've checked and they only support TLS 1.3 it seems.
Tried using postman and that works. It shows me the payload after downloading the xml file.
Also tried using Edge browser, no problem.

I'm running windows 10 Pro and using .Net 9.0 in visual studio 2022.
The error I keep getting:

Exception thrown: 'System.Net.Http.HttpRequestException' in System.Private.CoreLib.dll

The SSL connection could not be established, see inner exception. System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception.
---> System.ComponentModel.Win32Exception (0x80090331): The client and server cannot communicate, because they do not possess a common algorithm.

I've configfured the httphandler like this:

         {
            ClientCertificateOptions = ClientCertificateOption.Automatic,
            SslProtocols = SslProtocols.Tls13, // SslProtocols.None, // SslProtocols.Tls12 |
            UseDefaultCredentials = false,
            PreAuthenticate = false,
            AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate | DecompressionMethods.Brotli,
            AllowAutoRedirect = true,
            UseCookies = true,
            ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => { return true; }
        };

Method is get via the httpclient, and sending the same headers as postman:

         client.DefaultRequestHeaders.Add("Accept-Encoding", "deflate, gzip;q=1.0, *;q=0.5"); 
         client.DefaultRequestHeaders.Add("Cache-Control", "max-age=0");

client.DefaultRequestHeaders.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7");
client.DefaultRequestHeaders.Add("User-Agent", "PostmanRuntime/7.43.0");
client.DefaultRequestHeaders.Add("Connection", "keep-alive");

I hope you can help me get me on the right track.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions