yallie / MdlpClient

Честный знак. ИС «Маркировка». MDLP REST API Client
https://честныйзнак.рф/business/projects/medicines/documents/for_developers/
MIT License
22 stars 8 forks source link

Connection issue #19

Closed Phoedoth closed 2 years ago

Phoedoth commented 2 years ago

Добрый день. Где-то неделю назад перестал подключаться:

MdlpApiClient.MdlpException HResult=0x80131500 Message=The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. Source=MdlpApiClient StackTrace: at MdlpApiClient.MdlpClient.ThrowOnFailure(IRestResponse response) at MdlpApiClient.MdlpClient.Execute[T](IRestRequest request, String apiMethodName) at MdlpApiClient.MdlpClient.Post[T](String url, Object body, Parameter[] parameters, String apiMethodName) at MdlpApiClient.MdlpClient.Authenticate(String clientId, String clientSecret, String userId, String authType) at MdlpApiClient.ResidentCredentials.Authenticate(MdlpClient apiClient) at MdlpApiClient.CredentialsAuthenticator.Authenticate(IRestClient client, IRestRequest request) at RestSharp.RestClient.Execute(IRestRequest request, String httpMethod, Func`3 getResponse) at RestSharp.RestClient.Execute(IRestRequest request) at RestSharp.RestClient.Execute[T](IRestRequest request) at MdlpApiClient.MdlpClient.Execute[T](IRestRequest request, String apiMethodName) at MdlpApiClient.MdlpClient.Post[T](String url, Object body, Parameter[] parameters, String apiMethodName) at MdlpApiClient.MdlpClient.Authenticate(String clientId, String clientSecret, String userId, String authType) at MdlpApiClient.ResidentCredentials.Authenticate(MdlpClient apiClient) at MdlpConnect.Program.Main(String[] args) in \MdlpConnect\MdlpConnect\Program.cs:line 25

Inner Exception 1: WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

Inner Exception 2: AuthenticationException: The remote certificate is invalid according to the validation procedure.

Сертификат в порядке. Подключение к вэб-версии через него работает. Буду признателен за любые идеи

Phoedoth commented 2 years ago

Пардон, не заметил что сертификат теперь другой корневой.