Why WCF InstanceContextMode.PerSession is not working over https?

前端 未结 1 1384
攒了一身酷
攒了一身酷 2021-01-15 23:54

I have problems with [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession )]

I have simple wcf service, which is hosted in IIS 7.

Service c

相关标签:
1条回答
  • 2021-01-16 00:36

    I got session support working over HTTPS.

    WSHttpBinding does not support reliable sessions over transport security (HTTPS).

    Instead of using wsHttpBinding, I created a custom binding:

    <customBinding>
      <binding configurationName="customReliableHttpBinding">
        <reliableSession />
        <textMessageEncoding/>
        <httpsTransport authenticationScheme="Anonymous" requireClientCertificate="true"/>
      </binding>
    </customBinding>
    
    0 讨论(0)
提交回复
热议问题