Skip to content

Issues with TLS and adding subscribers #79

Description

@robertjf

We have implemented adding Subscribers to a form using the latest campaignmonitor-api Nuget package (v. 6.0.2) and have been having trouble getting the connection to work.

Environment:

Umbraco 13 (dotnet 8)
TLS 1.2 and 1.3 supported

When we first start the site, the system uses TLS 1.2 (logged as "SystemDefault") which works, however if we wait a few minutes and try again, it uses TLS 1.3 which fails with the following error:

System.Net.WebException: The SSL connection could not be established, see inner exception.
---> System.Net.Http.HttpRequestException: 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 don't know what I can do to stop this behaviour, and I don't think it's a good idea to force it to just Tls1.2, is there a way Campaign Monitor can support TLS 1.3 on the create-send api?

Our code for testing is as follows:


            AuthenticationDetails auth = new ApiKeyAuthenticationDetails(ApiKey);
            Subscriber subscriber = new(auth, ListId);
            logger.LogDebug("SecurityProtocol: {protocol}", ServicePointManager.SecurityProtocol);
            
            var result = subscriber.Add(email, name, customFields, true, track, mobileNumber: mobile, sendSms);

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