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

问题描述 投票:0回答:1

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

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

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

.net wcf ssl asynchronous duplex
1个回答
0
投票

当我们使用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 如果问题仍然存在,请随时告诉我。

© www.soinside.com 2019 - 2024. All rights reserved.