自托管wcf https仅在iis具有站点w https绑定时起作用 [英] Self hosted wcf https works only when iis has a site w https binding

查看:53
本文介绍了自托管wcf https仅在iis具有站点w https绑定时起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自托管的wcf服务,windws 10,iis 10

I have a self hosted wcf service, windws 10, iis 10

只有当iis也有时,WCF服务才能监听https:// ...:443绑定到443的站点

The WCF service can listen on https://...:443 only if iis also has a site bound to 443

如果我停止绑定到443的IIS站点,我的自托管WCF服务将无法再由客户端连接

If I stop the IIS site bound to 443, my self hosted WCF service can no longer be connected to by a client

我在本地机器商店有一个GoDaddy证书

我制作并运行以下.bat文件

I have a GoDaddy cert in the local machine store
I made and ran the following .bat file

推荐答案

嗨Bill,

对于使用https绑定托管WCF服务,我们通常使用传输安全性并在IIS站点绑定中添加https绑定模块。 WCF项目模板是WCF服务应用程序。



至于将证书绑定到相应的端口,通常由IIS完成。

请参阅以下文档。

https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/how-to-configure-an-iis-hosted-wcf-service-with-ssl

对于自托管控制台应用程序,我们需要使用NETSH命令将证书绑定到端口,如您在帖子中所示。

HTTPS://文档.microsoft.com / zh-CN / dotnet / framework / wcf / feature-details / how-to-configure-a-port-with-an-ssl-certificate

随意使...能够 我知道是否有任何我可以提供的帮助。

最好的问候

亚伯拉罕
Hi Bill,
For hosting a WCF service using https binding, we usually use transport security and add a https binding in IIS site binding module. The WCF project template is WCF service application.

As for binding a certificate to the corresponding port, it is usually completed by the IIS.
Please refer to the following document.
https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/how-to-configure-an-iis-hosted-wcf-service-with-ssl
For self-hosting Console application, we need to bind the certificate to the port with NETSH command, as you showed in your post.
https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/how-to-configure-a-port-with-an-ssl-certificate
Feel free to let me know if there is anything I can help with.
Best Regards
Abraham


这篇关于自托管wcf https仅在iis具有站点w https绑定时起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆