Windows Communication Foundation


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
 
Ad

Advertisements

V

Vadym Stetsyak

Hello, Allen!

You can also ask on WCF newsgroup

microsoft.public.windows.developer.winfx.indigo

You wrote on Fri, 23 Mar 2007 10:04:25 +0100:

AB> When i try to instance ServiceHost it's throw an
AB> System.InvalidOperationException with Message like 'Contract Require
AB> Duplex but on Binding Configuration is not Supported or is not been
AB> Configured'

AB> How Can I use Streamed TransportMode and Duplex Communication Service?

AB> Xml Configuration:

AB> <configuration>
AB> <system.serviceModel>
AB> <behaviors>
AB> <serviceBehaviors>
AB> <behavior name="NewBehavior">
AB> <serviceMetadata />
AB> </behavior>
AB> </serviceBehaviors>
AB> </behaviors>
AB> <bindings>
AB> <netTcpBinding>
AB> <binding name="NewBinding0" transferMode="Streamed" />
AB> </netTcpBinding>
AB> </bindings>
AB> <services>
AB> <service behaviorConfiguration="NewBehavior"
AB> name="CallBackService.CallBackService">
AB> <endpoint address="CallBackService"
AB> binding="netTcpBinding" bindingConfiguration="NewBinding0"
AB> contract="CallBackService.ICallBackService" />
AB> <endpoint address="CallBackService/mex"
AB> binding="mexTcpBinding"
AB> bindingConfiguration="" contract="IMetadataExchange"
AB> />
AB> <host>
AB> <baseAddresses>
AB> <add baseAddress="net.tcp://acquleobook" />
AB> </baseAddresses>
AB> </host>
AB> </service>
AB> </services>
AB> </system.serviceModel>
AB> </configuration>

AB> P.S.

AB> I'm using for callback One-Way OperationContract due to fix WinForms
AB> Main Thread Deadlock.


With best regards, Vadym Stetsyak.
Blog: http://vadmyst.blogspot.com
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top