我的WCF服务实现出现,以便拥有所有必要的HTTPS配置设置。整个客户 - >服务通信工作得很好,我的问题是请求响应似乎没有通过HTTPS传输。
我的配置:
wsHttpBinding - 检查
mexHttpsBinding - 检查
安全模式=“消息” - 检查
httpsGetEnabled - 检查
当我检查Fiddler中的通信时,我看到请求和响应是通过HTTP而不是HTTPS进行的。这与WSDL行动有关,该行动指出:
location="http://ws019.sms.com/Alpha.Services.AMSB2B/DeviceService.svc/Journey"/
wsa10:Address
http://ws019.sms.com/Alpha.Services.AMSB2B/DeviceService.svc/Journey
/wsa10:Address
此外,在客户端的端点配置中,端点指向HTTP地址而不是HTTPS地址(可能是在查看WSDL),例如。
endpoint address="http://ws019.sms.com/Alpha.Services.AMSB2B/DeviceService.svc/Device"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IDeviceService"
contract="AMSB2B.IDeviceService" name="WSHttpBinding_IDeviceService"
为什么WSDL /客户端端点地址中有HTTP,而不是HTTPS?如果我手动更改配置,它会在运行时抱怨期望HTTP。
有什么想法吗?
感谢。
答案 0 :(得分:1)
您的配置错误。带有Message安全性的WsHttpBinding使用HTTP。您必须使用传输安全性。