【发布时间】:2011-08-11 20:00:44
【问题描述】:
我想同时使用会话和 SSL,因此我设置了所有证书并确保在 WCF 服务上正确设置了所有内容。我已经尝试了一切,但我似乎无法让它发挥作用。它向我抛出了一个 InvalidoperationException,说 WsHttpBinding 无法创建安全会话,我应该使用 MessageSecurity 而不是 TransportSecurity。但我想使用 Https 而不是 Http,所以我想使用 TransportSecurity。谁能帮帮我。提前致谢。
WsHttpBinding 的 App.config:
<wsHttpBinding>
<binding name="WSHttpBinding">
<reliableSession enabled="True" />
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</wsHttpBinding>
编辑:我忘了提到当我尝试调用 ServiceHost.Open() 时会发生 InvalidOperationException 所以 Logging 不会有什么好处,但是谢谢你提到它。
【问题讨论】:
标签: .net wcf app-config wcf-binding wcf-security