指定HTTPS进行自定义WCF绑定 [英] Specify HTTPS for custom WCF Binding
问题描述
我有一个自定义绑定定义如下:
I have an custom binding defined as follows:
<customBinding>
<binding name="binaryHttpBinding">
<binaryMessageEncoding />
<httpTransport />
</binding>
这是用于一个Silverlight 3应用程序用于连接到服务端点。这工作在HTTP很好,但我想说明这个绑定使用HTTPS,我有点失去了对如何定义。我使用selfSSL.exe从IIS资源工具包安装在我的本地机器上的SSL。我可以浏览SVC文件细度过HTTPS(尽管浏览器抛出了一个警告,它不是一个公认的证书)。我怎么可以设定这个自定义绑定使用传输的安全性通过HTTPS?
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?
推荐答案
简单的改变,使用httpsTransport像这样:
Simple change, use the httpsTransport like so:
<customBinding>
<binding name="binaryHttpBinding">
<binaryMessageEncoding />
<httpsTransport />
</binding>
这篇关于指定HTTPS进行自定义WCF绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!