【发布时间】:2010-04-30 07:53:42
【问题描述】:
我需要使用 Windows 窗体应用程序连接到提供商的 Web 服务。他给了我一个访问它的证书,但我有一个安全问题。
我已经完成了以下步骤:
- 将证书添加到个人商店(在 IE 和 Firefox 上)
- 使用远程 wsdl 生成代理(没问题)
-
使用此代码调用方法:
`使用 (service1.MessagesService m = new service1.MessagesService()) {
X509Certificate crt = new X509Certificate(@"C:\OpenSSL\bin\thecert.p12",string.Empty);
m.ClientCertificates.Add(crt);
var 结果 = m.AuthoriseTransaction(aut);this.textBox1.AppendText(result.id.ToString());
}`
我有以下错误:
底层连接已关闭:无法为通道 SSL/TLS 建立信任关系。
感谢您的帮助
【问题讨论】:
标签: c# .net winforms web-services https