Код: Выделить всё
Код: Выделить всё
X509Store store = new X509Store(StoreName.Root, StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadOnly);
X509Certificate2Collection certificates = store.Certificates.Find(
X509FindType.FindByThumbprint, "5b92cf508b894aec82074514954185ecd78b654a", true); //I am seeing the certificate correctly. Please see the screenshot below.
InstanceContext context = new InstanceContext(callback);
this.SystemService = new SystemServiceClient(context, tcpBinding, tcpAddress);
this.SystemService.ClientCredentials.ClientCertificate.Certificate = certificates[0];

При попытке установить соединение со службой WCF с помощью строки string[] lstIFs = this.ServerConnection.NetworkService .GetNetworkInterfaces(); мы получаем следующую ошибку: «System.ServiceModel.Security.SecurityNegotiationException Не удалось установить доверительные отношения для безопасного канала SSL/TLS с полномочиями».

Изменить
Вот трассировка стека для исключения
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
Код: Выделить всё
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at EchoAdminClient.SystemService.INetworkSettingService.GetNetworkInterfaces()
at EchoAdminClient.SystemService.NetworkSettingServiceClient.GetNetworkInterfaces() in C:\Git\EchoAdminForEcho65XPlus\EchoAdminClient\Connected Services\SystemService\Reference.cs:line 843
at EchoAdminClient.MainForm.UpdateNetworkSettings() in C:\Git\EchoAdminForEcho65XPlus\EchoAdminClient\MainForm.cs:line 556
at EchoAdminClient.MainForm.ConnectServer() in C:\Git\EchoAdminForEcho65XPlus\EchoAdminClient\MainForm.cs:line 495
Код: Выделить всё
Data: "Could not establish trust relationship for the SSL/TLS secure channel with authority 'localhost:8080'."
Type: System.ServiceModel.Security.SecurityNegotiationException
Код: Выделить всё
"The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."
Type: System.Exception {System.Net.WebException}
Код: Выделить всё
{"The remote certificate is invalid according to the validation procedure."}
Type: System.Exception {System.Security.Authentication.AuthenticationException}
[img]https://i.sstatic.net /fzRm7Be6.png[/img]
Подробнее здесь: https://stackoverflow.com/questions/785 ... re-channel