C# JIRA 错误消息:请求已中止:无法创建 SSL/TLS 安全通道



当我运行它时,它可以工作并给出有效的响应

private readonly Lazy<Jira> jiraClient = new Lazy<Jira>(() => Jira.CreateRestClient("https://jira...", "name", "pass"));

但是当我尝试运行它时,我收到一个错误。

Issue issue = await this.jiraClient.Value.Issues.GetIssueAsync(jiraId);
Error Message: The request was aborted: Could not create SSL/TLS secure channel

这是答案 请求已中止:无法创建 SSL/TLS 安全通道

ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

最新更新