[英]Accessing Securised Web Service
I need to connect to a provider's web service with a Windows Form application. 我需要使用Windows Form应用程序连接到提供商的Web服务。 He gives me a certificate to access it but I have a security problem.
他给了我一个访问它的证书,但是我遇到了安全问题。
I have done these following steps : 我已完成以下步骤:
Use this code to call a method : 使用此代码来调用方法:
`using (service1.MessagesService m = new service1.MessagesService()) { 使用(service1.MessagesService m =新service1.MessagesService()){
X509Certificate crt = new X509Certificate(@"C:\\OpenSSL\\bin\\thecert.p12",string.Empty); X509Certificate crt =新的X509Certificate(@“ C:\\ OpenSSL \\ bin \\ thecert.p12”,string.Empty);
m.ClientCertificates.Add(crt); m.ClientCertificates.Add(crt);
var result = m.AuthoriseTransaction(aut); var result = m.AuthoriseTransaction(aut);
this.textBox1.AppendText(result.id.ToString()); this.textBox1.AppendText(result.id.ToString());
}` }`
I have the following error : 我有以下错误:
The underlying connection was closed: Could not establish trust relationship for the channel SSL / TLS.
基础连接已关闭:无法建立通道SSL / TLS的信任关系。
Thanks for your help 谢谢你的帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.