[英]pollingDuplexHttpBinding with security mode TransportWithMessageCredential. response from server don't come to client
we use pollingDuplexHttpBinding over SSL with security mode TransportWithMessageCredential . 我们通过安全模式TransportWithMessageCredential在SSL上使用pollingDuplexHttpBinding。 Service receive messages from client, but client don't get response. 服务从客户端接收消息,但客户端未得到响应。
If we change security mode from TransportWithMessageCredential to Transport all work good. 如果我们将安全模式从TransportWithMessageCredential更改为Transport,则一切正常。
Working configuration 工作配置
Comments to show don't working config. 注释显示不起作用的配置。
Service config 服务配置
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<!--
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom"
customUserNamePasswordValidatorType="myType" />
</serviceCredentials>
-->
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<pollingDuplexHttpBinding>
<binding name="multipleMessagesPerPollPollingDuplexHttpBinding"
duplexMode="SingleMessagePerPoll">
<!--
<security mode="TransportWithMessageCredential" />
-->
<security mode="Transport" />
</binding>
</pollingDuplexHttpBinding>
</bindings>
<services>
<service name="Gam.Service.GamSrv">
<endpoint
address=""
binding="pollingDuplexHttpBinding"
bindingConfiguration="multipleMessagesPerPollPollingDuplexHttpBinding"
contract="Gam.Service.Abstract.IUserSrv" />
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
</services>
SilverLight 4 Client config SilverLight 4客户端配置
<bindings>
<customBinding>
<binding name="pd">
<!--
<security authenticationMode="UserNameOverTransport" />
-->
<pollingDuplex duplexMode="SingleMessagePerPoll" />
<binaryMessageEncoding />
<httpsTransport transferMode="Buffered" />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="/GamSrv.svc"
binding="customBinding"
bindingConfiguration="pd"
contract="GamSrvReference.IUserSrv"
name="MyDuplexContract" />
</client>
解决方案-在客户端安全配置中添加includeTimestamp =“ false”
<security authenticationMode="UserNameOverTransport" includeTimestamp="false" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.