我有这个约束力:
<customBinding> <binding name="b1"> <security authenticationMode="UserNameForSslNegotiated"> <secureConversationBootstrap /> </security> <binaryMessageEncoding/> <httpTransport/> </binding> </customBinding>
当我使用嗅探器查看呼叫时,我看到每个呼叫有3次往返。
通过查看请求,我发现
<t:RequestSecurityToken â¦>
<t:RequestSecurityTokenResponseâ¦>
有没有一种传递凭证和真实信息的方法?
2010年8月23日更新: 我还没有找到解决这个问题的办法。
假设你正在使用 HTTPS 对于您的交通工具,您是否尝试过:
HTTPS
UserNameOverTransport ,以便使用“安全”传输来交换凭据,而不是尝试设置“安全”消息通道。
UserNameOverTransport
还有你的 secureConversationBootstrap 是多余的,因为它只在 authenticationMode="SecureConversation"
secureConversationBootstrap
authenticationMode="SecureConversation"
<customBinding> <binding name="b1"> <security authenticationMode="UserNameOverTransport"/> <binaryMessageEncoding/> <httpsTransport/> </binding> </customBinding>
如果你想让一切都清楚,那么使用 <httpTransport/>
<httpTransport/>