Specify HTTPS for custom WCF Binding

天涯浪子 提交于 2019-12-24 03:36:45

问题


I have an custom binding defined as follows:

<customBinding>
<binding name="binaryHttpBinding">
 <binaryMessageEncoding />
 <httpTransport />
</binding>

This is used for an endpoint that a Silverlight 3 application uses to connect to the service. This works fine under HTTP, but i would like to specify this binding to use HTTPS and I am kinda lost on how to define that. I am using selfSSL.exe from the IIS Resource Toolkit to setup an SSL on my local machine. I can browse the svc file fine through HTTPS (although the browser throws up a warning that its not a recognized cert). How can i setup this custom binding to use transport security over HTTPS?


回答1:


Simple change, use the httpsTransport like so:

<customBinding>
<binding name="binaryHttpBinding">
 <binaryMessageEncoding />
 <httpsTransport />
</binding>


来源:https://stackoverflow.com/questions/2420899/specify-https-for-custom-wcf-binding

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!