我正在使用以下配置使我的服务具有会话性,但是对于每个请求,wcf 服务都会使用新的会话 ID 响应我。为什么会这样,我需要让它为该客户端会话,以便每个请求都应该有相同的会话 ID
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="wsHttp">
<readerQuotas maxStringContentLength="10240" />
<reliableSession enabled="true" />
</binding>
</wsHttpBinding>
</bindings>
<services>
<service name="wcfservice.serviceclass" behaviorConfiguration="MyFileServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:51/"/>
<add baseAddress="net.tcp://localhost:52/"/>
</baseAddresses>
</host>
<endpoint address="pqr" binding="wsHttpBinding" bindingConfiguration="wsHttp"
name="b" contract="wcfservice.Iservice" />
<endpoint address="pqr" binding="netTcpBinding"
name="c" contract="wcfservice.Iservice" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MyFileServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>