如何让 WCF 服务通过 SSL 运行?
我正在 IIS6 中运行 C# Web 服务,并尝试让它通过 SSL 工作。执行 tcpdump 时,它显示初始调用为 https,但所有其他调用都显示为 http。我的 SSL 证书是自签名的,并且 https 在我的网络浏览器中运行良好。我正在使用 PHP SoapClient 作为客户端。
有谁知道什么会导致这个?
在 wsdl 中,地址位置设置为 http。这应该是 https 吗?我该如何改变它?
<wsdl:service name="Service">
<wsdl:port name="BasicHttpBinding_Service" binding="i0:BasicHttpBinding_Service">
<soap:address location="http://example.com/Service.svc"/>
</wsdl:port>
</wsdl:service>
I'm running a C# web service in IIS6 and trying to get it to work over SSL. When doing a tcpdump it shows the initial call as https but every other call over http. My SSL certificate is self signed and https works fine in my web browser. I'm using PHP SoapClient for the client.
Does anyone know what would cause this?
In the wsdl the address location is set to http. Should this be https? How do I change it?
<wsdl:service name="Service">
<wsdl:port name="BasicHttpBinding_Service" binding="i0:BasicHttpBinding_Service">
<soap:address location="http://example.com/Service.svc"/>
</wsdl:port>
</wsdl:service>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须将服务配置为使用 HTTPS:
这将允许仅通过 HTTPS 调用您的服务,因为没有公开不安全的端点。 WSDL 也只能通过 HTTPS 访问,因为未启用 HTTP GET。
You must configure your service to use HTTPS:
This will allow calling your service only over HTTPS because there is no unsecured endpoint exposed. WSDL will also be accessible only over HTTPS because HTTP GET is not enabled.