A
Allen Bradley
I need to implement a Service with CallBack Contract and setting
TransportMode in binding configuration set to Streamed.
When i try to instance ServiceHost it's throw an
System.InvalidOperationException with Message like 'Contract Require
Duplex but on Binding Configuration is not Supported or is not been
Configured'
How Can I use Streamed TransportMode and Duplex Communication Service?
Xml Configuration:
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="NewBehavior">
<serviceMetadata />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<netTcpBinding>
<binding name="NewBinding0" transferMode="Streamed" />
</netTcpBinding>
</bindings>
<services>
<service behaviorConfiguration="NewBehavior"
name="CallBackService.CallBackService">
<endpoint address="CallBackService"
binding="netTcpBinding" bindingConfiguration="NewBinding0"
contract="CallBackService.ICallBackService" />
<endpoint address="CallBackService/mex"
binding="mexTcpBinding"
bindingConfiguration="" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://acquleobook" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
</configuration>
P.S.
I'm using for callback One-Way OperationContract due to fix WinForms
Main Thread Deadlock.
Thanks
TransportMode in binding configuration set to Streamed.
When i try to instance ServiceHost it's throw an
System.InvalidOperationException with Message like 'Contract Require
Duplex but on Binding Configuration is not Supported or is not been
Configured'
How Can I use Streamed TransportMode and Duplex Communication Service?
Xml Configuration:
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="NewBehavior">
<serviceMetadata />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<netTcpBinding>
<binding name="NewBinding0" transferMode="Streamed" />
</netTcpBinding>
</bindings>
<services>
<service behaviorConfiguration="NewBehavior"
name="CallBackService.CallBackService">
<endpoint address="CallBackService"
binding="netTcpBinding" bindingConfiguration="NewBinding0"
contract="CallBackService.ICallBackService" />
<endpoint address="CallBackService/mex"
binding="mexTcpBinding"
bindingConfiguration="" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://acquleobook" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
</configuration>
P.S.
I'm using for callback One-Way OperationContract due to fix WinForms
Main Thread Deadlock.
Thanks