gpt4 book ai didi

.net - Blazor 错误 : The SSL connection could not be established, 请参阅内部异常

转载 作者:行者123 更新时间:2023-12-04 22:42:02 28 4
gpt4 key购买 nike

您好,我尝试在 SAP 中使用 api 进行测试,我有这段代码,我使用 .net core 5 和 Blazor

private async Task<bool> ValidateUser()
{
try
{
_login.CompanyDB = "VISUALK_CL";

string serializedUser = JsonConvert.SerializeObject(_login);

HttpRequestMessage httpRequestMessage = new HttpRequestMessage();

httpRequestMessage.Method = new HttpMethod("POST");
httpRequestMessage.RequestUri = new Uri("https://office.visualk.cl:50346//b1s/v1/Login");
httpRequestMessage.Content = new StringContent(serializedUser);


httpRequestMessage.Content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/json");

var response = await Http.SendAsync(httpRequestMessage);
var responseStatusCode = response.StatusCode;
var responseBody = await response.Content.ReadAsStringAsync();


if (responseStatusCode.ToString() == "OK")
{
var returnedUser = JsonConvert.DeserializeObject<Login>(responseBody);
NavManager.NavigateTo("/", forceLoad: true);
}
else
{

}

return await Task.FromResult(true);
}
catch (Exception ex)
{
NavManager.NavigateTo("/LogPostulaciones", forceLoad: true);
throw;
}
}
但是什么时候去排队
var response = 等待 Http.SendAsync(httpRequestMessage);
内在 EX :
根据验证程序远程证书无效:RemoteCertificateNameMismatch, RemoteCertificateChainErrors
我收到错误
为所有人

最佳答案

好的,当我在 Firefox 中删除该 URL 时,我得到

Secure Connection Failed

An error occurred during a connection to office.visualk.cl:50346. Peerusing unsupported version of security protocol.

Error code: SSL_ERROR_UNSUPPORTED_VERSION

The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the web site owners to inform them of this problem.

Learn more…

This web site might not support the TLS 1.2 protocol, which is theminimum version supported by Firefox. Enabling TLS 1.0 and TLS 1.1might allow this connection to succeed.

TLS 1.0 and TLS 1.1 will be permanently disabled in a future release.


Chrome 只是显示一个错误,没有更多信息。
此规则由浏览器而非 Blazor 强制执行。
您可能会使用 Firefox 的提议通过启用 TLS 1.1 来降低安全性,但最好的方法是联系 的所有者/运营商。 office.visualk.cl 并告诉他们他们的软件已过时。

关于.net - Blazor 错误 : The SSL connection could not be established, 请参阅内部异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68516455/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com