Binding WSHttp and ReliableSession / MaxRetryCount

When used WSHttpBindingin WCF with safeSessions support, my help desk is updated:

<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="true">
</reliableSession>

I cannot add an attribute maxRetryCountto trustSession if the binding is configured as WSHttpBinding.

Now my question is: what is the meaning maxRetryCountwhen using WSHttpBinding, and is there any way to change this in config; without using CustomBinding?

+3
source share
1 answer

You cannot install maxRetryCountin the standard configuration wsHttpBinding. To set this value, you need to create a separate custom binding, and then refer to its service or client configuration:

  <system.serviceModel>
    <bindings>
      <customBinding>
        <binding name="wsCustomBinding">
          <reliableSession maxRetryCount="15"/>
          <textMessageEncoding/>
          <httpTransport />
        </binding>
      </customBinding>
    </bindings>
    <services>
      <service name="MyService">
        <endpoint address="http://localhost:7878/MyServoce"
                  binding="customBinding"
                  bindingConfiguration="wsCustomBinding"
                  contract="IMyService" />
      </service>
    </services>
  </system.serviceModel>

- , , - . MSDN docs .

, <bindings> bindings.config, web.config/app.config:

  <system.serviceModel>
    <bindings configSource="bindings.config">

Visual Studio squiggly - , , , (XML- Visual Studio, , ).

+8

Source: https://habr.com/ru/post/1726697/


All Articles