繁体   English   中英

与https回复端点的WCF双工连接

[英]Wcf duplex connection with https reply endpoint

我有一个带有回调的双工Wcf连接,通过http可以正常工作(当我使用<compositeDuplex clientBaseAddress="http://localhost:8678/.."/> ),但是当我尝试将该地址切换为https( "https://localhost:8678/.." ),当服务器尝试回复时,我从服务器端收到该错误

这可能是由于在HTTPS情况下未使用HTTP.SYS正确配置服务器证书的事实

我可以以某种方式以编程方式为该临时答复端点安装证书吗? 也许以某种方式创建ServiceHost对象并在创建InstanceContext时使用它?

当我们使用https协议地址相互通信时,需要使用以下命令来设置证书。

netsh http add sslcert ipport = 0.0.0.0:8000 certhash = 0000000000003ed9cd0c315bbb6dc1c08da5e6 appid = {00112233-4455-6677-8899-AABBCCDDEEFF}

这是官方详细信息。
https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/how-to-configure-a-port-with-an-ssl-certificate
https://docs.microsoft.com/en-us/windows/desktop/http/add-sslcert
如果使用Internet信息服务器(IIS)托管服务,则可以使用IIS完成该服务。 https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/how-to-configure-an-iis-hosted-wcf-service-with-ssl
如果问题仍然存在,请随时告诉我。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM