Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Indigo

problem with Duplex System using wsDualHttpBinding

Update your Vista Drivers Update Your Drivers Now!!
 
 
Thread Tools Display Modes
Old 02-07-2007   #1 (permalink)
Sebastian Dau
Guest


 

problem with Duplex System using wsDualHttpBinding

Hello News Group,

I'm playing with WCF and was able to build a properly working Duplex system
using netTcpBinding.
However, when changing the configuration to wsDualHttpBinding I get an error
message on the host side when trying
to call back the client proxy:

ProtocolException {"The remote server returned an unexpected response: (400)
Bad Request."}
->InnerException: WebException{"The remote server returned an error: (400)
Bad Request."}

Getting the client proxy reference works fine with:

_client =
OperationContext.Current.GetCallbackChannel<ISpectralServiceCallbackContract>();

calling

_client.SomeOperation();

wails with the upper exception.

My Host Config File (Done with Service Conf. Editor) looks like:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="NewBehavior" />
</endpointBehaviors>
<serviceBehaviors>
<behavior name="publicateBH">
<serviceMetadata httpGetEnabled="true"
httpGetUrl="http://localhost/mex" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="publicateBH"
name="WCFServices.SpectralService">
<endpoint address="net.tcp://localhost/SpectralService"
binding="netTcpBinding"
bindingConfiguration="" name="tcp"
contract="WCFServices.ISectralService" />
<endpoint address="http://localhost:249/SpectralService"
binding="wsDualHttpBinding"
bindingConfiguration="" name="wshttp"
contract="WCFServices.ISectralService" />
<endpoint address="net.pipe://localhost/SpectralService"
binding="netNamedPipeBinding"
bindingConfiguration="" name="pipe"
contract="WCFServices.ISectralService" />
</service>
</services>
</system.serviceModel>
</configuration>

The client config file reads (generated with "svcutil
http://localhost/mex"):

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<netNamedPipeBinding>
<binding name="pipe" closeTimeout="00:01:00"
openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00"
transactionFlow="false"
transferMode="Buffered"
transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288"
maxBufferSize="65536" maxConnections="10"
maxReceivedMessageSize="65536">
<readerQuotas maxDepth="32"
maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384"
/>
<security mode="Transport">
<transport protectionLevel="EncryptAndSign" />
</security>
</binding>
</netNamedPipeBinding>
<netTcpBinding>
<binding name="tcp" closeTimeout="00:01:00"
openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00"
transactionFlow="false"
transferMode="Buffered"
transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard"
listenBacklog="10"
maxBufferPoolSize="524288" maxBufferSize="65536"
maxConnections="10"
maxReceivedMessageSize="65536">
<readerQuotas maxDepth="32"
maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384"
/>
<reliableSession ordered="true"
inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Transport">
<transport clientCredentialType="Windows"
protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows" />
</security>
</binding>
</netTcpBinding>
<wsDualHttpBinding>
<binding name="wshttp" closeTimeout="00:01:00"
openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false"
clientBaseAddress="http://localhost:8000/Client"
transactionFlow="false"
hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288"
maxReceivedMessageSize="65536" messageEncoding="Text"
textEncoding="utf-8"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32"
maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384"
/>
<reliableSession ordered="true"
inactivityTimeout="00:10:00" />
<security mode="Message">
<message clientCredentialType="Windows"
negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsDualHttpBinding>
</bindings>
<client>
<endpoint address="net.tcp://localhost/SpectralService"
binding="netTcpBinding"
bindingConfiguration="tcp" contract="ISectralService"
name="tcp">
<identity>
<userPrincipalName value="TRACE-HOME\Sebastian Dau" />
</identity>
</endpoint>
<endpoint address="http://localhost:249/SpectralService"
binding="wsDualHttpBinding"
bindingConfiguration="wshttp" contract="ISectralService"
name="wshttp">
<identity>
<userPrincipalName value="TRACE-HOME\Sebastian Dau" />
</identity>
</endpoint>
<endpoint address="net.pipe://localhost/SpectralService"
binding="netNamedPipeBinding"
bindingConfiguration="pipe" contract="ISectralService"
name="pipe">
<identity>
<userPrincipalName value="TRACE-HOME\Sebastian Dau" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>

As I said, it works pretty well using the net.tcp channel, but it fails with
dual http.

Does anybody know what to change in order to get it to work?

Thanks in advance,

Sebastian Dau (MCTS .NET 2.0)


My System SpecsSystem Spec
Old 02-13-2007   #2 (permalink)
Sebastian Dau
Guest


 

Re: problem with Duplex System using wsDualHttpBinding

Just in case you might struggle yourself with it. I had to increase the
transfer buffers since I was passing large arrays.
Now it works perfect.

"Sebastian Dau" <dau@zeiss.de> wrote in message
news:Ost5V0tSHHA.5012@TK2MSFTNGP04.phx.gbl...
> Hello News Group,
>
> I'm playing with WCF and was able to build a properly working Duplex
> system using netTcpBinding.
> However, when changing the configuration to wsDualHttpBinding I get an
> error message on the host side when trying
> to call back the client proxy:
>
> ProtocolException {"The remote server returned an unexpected response:
> (400) Bad Request."}
> ->InnerException: WebException{"The remote server returned an error: (400)
> Bad Request."}
>
> Getting the client proxy reference works fine with:
>
> _client =
> OperationContext.Current.GetCallbackChannel<ISpectralServiceCallbackContract>();
>
> calling
>
> _client.SomeOperation();
>
> wails with the upper exception.
>
> My Host Config File (Done with Service Conf. Editor) looks like:
>
> <?xml version="1.0" encoding="utf-8"?>
> <configuration>
> <system.serviceModel>
> <behaviors>
> <endpointBehaviors>
> <behavior name="NewBehavior" />
> </endpointBehaviors>
> <serviceBehaviors>
> <behavior name="publicateBH">
> <serviceMetadata httpGetEnabled="true"
> httpGetUrl="http://localhost/mex" />
> </behavior>
> </serviceBehaviors>
> </behaviors>
> <services>
> <service behaviorConfiguration="publicateBH"
> name="WCFServices.SpectralService">
> <endpoint address="net.tcp://localhost/SpectralService"
> binding="netTcpBinding"
> bindingConfiguration="" name="tcp"
> contract="WCFServices.ISectralService" />
> <endpoint address="http://localhost:249/SpectralService"
> binding="wsDualHttpBinding"
> bindingConfiguration="" name="wshttp"
> contract="WCFServices.ISectralService" />
> <endpoint address="net.pipe://localhost/SpectralService"
> binding="netNamedPipeBinding"
> bindingConfiguration="" name="pipe"
> contract="WCFServices.ISectralService" />
> </service>
> </services>
> </system.serviceModel>
> </configuration>
>
> The client config file reads (generated with "svcutil
> http://localhost/mex"):
>
> <?xml version="1.0" encoding="utf-8"?>
> <configuration>
> <system.serviceModel>
> <bindings>
> <netNamedPipeBinding>
> <binding name="pipe" closeTimeout="00:01:00"
> openTimeout="00:01:00"
> receiveTimeout="00:10:00" sendTimeout="00:01:00"
> transactionFlow="false"
> transferMode="Buffered"
> transactionProtocol="OleTransactions"
> hostNameComparisonMode="StrongWildcard"
> maxBufferPoolSize="524288"
> maxBufferSize="65536" maxConnections="10"
> maxReceivedMessageSize="65536">
> <readerQuotas maxDepth="32"
> maxStringContentLength="8192" maxArrayLength="16384"
> maxBytesPerRead="4096"
> maxNameTableCharCount="16384" />
> <security mode="Transport">
> <transport protectionLevel="EncryptAndSign" />
> </security>
> </binding>
> </netNamedPipeBinding>
> <netTcpBinding>
> <binding name="tcp" closeTimeout="00:01:00"
> openTimeout="00:01:00"
> receiveTimeout="00:10:00" sendTimeout="00:01:00"
> transactionFlow="false"
> transferMode="Buffered"
> transactionProtocol="OleTransactions"
> hostNameComparisonMode="StrongWildcard"
> listenBacklog="10"
> maxBufferPoolSize="524288" maxBufferSize="65536"
> maxConnections="10"
> maxReceivedMessageSize="65536">
> <readerQuotas maxDepth="32"
> maxStringContentLength="8192" maxArrayLength="16384"
> maxBytesPerRead="4096"
> maxNameTableCharCount="16384" />
> <reliableSession ordered="true"
> inactivityTimeout="00:10:00"
> enabled="false" />
> <security mode="Transport">
> <transport clientCredentialType="Windows"
> protectionLevel="EncryptAndSign" />
> <message clientCredentialType="Windows" />
> </security>
> </binding>
> </netTcpBinding>
> <wsDualHttpBinding>
> <binding name="wshttp" closeTimeout="00:01:00"
> openTimeout="00:01:00"
> receiveTimeout="00:10:00" sendTimeout="00:01:00"
> bypassProxyOnLocal="false"
> clientBaseAddress="http://localhost:8000/Client"
> transactionFlow="false"
> hostNameComparisonMode="StrongWildcard"
> maxBufferPoolSize="524288"
> maxReceivedMessageSize="65536" messageEncoding="Text"
> textEncoding="utf-8"
> useDefaultWebProxy="true">
> <readerQuotas maxDepth="32"
> maxStringContentLength="8192" maxArrayLength="16384"
> maxBytesPerRead="4096"
> maxNameTableCharCount="16384" />
> <reliableSession ordered="true"
> inactivityTimeout="00:10:00" />
> <security mode="Message">
> <message clientCredentialType="Windows"
> negotiateServiceCredential="true"
> algorithmSuite="Default" />
> </security>
> </binding>
> </wsDualHttpBinding>
> </bindings>
> <client>
> <endpoint address="net.tcp://localhost/SpectralService"
> binding="netTcpBinding"
> bindingConfiguration="tcp" contract="ISectralService"
> name="tcp">
> <identity>
> <userPrincipalName value="TRACE-HOME\Sebastian Dau" />
> </identity>
> </endpoint>
> <endpoint address="http://localhost:249/SpectralService"
> binding="wsDualHttpBinding"
> bindingConfiguration="wshttp" contract="ISectralService"
> name="wshttp">
> <identity>
> <userPrincipalName value="TRACE-HOME\Sebastian Dau" />
> </identity>
> </endpoint>
> <endpoint address="net.pipe://localhost/SpectralService"
> binding="netNamedPipeBinding"
> bindingConfiguration="pipe" contract="ISectralService"
> name="pipe">
> <identity>
> <userPrincipalName value="TRACE-HOME\Sebastian Dau" />
> </identity>
> </endpoint>
> </client>
> </system.serviceModel>
> </configuration>
>
> As I said, it works pretty well using the net.tcp channel, but it fails
> with dual http.
>
> Does anybody know what to change in order to get it to work?
>
> Thanks in advance,
>
> Sebastian Dau (MCTS .NET 2.0)


My System SpecsSystem Spec
 

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
WCF Remote Client Callbacks using wsDualHttpBinding lmod .NET General 1 08-22-2008 04:06 AM
Problems with wsDualHttpBinding in duplex scenario DuZhanghua VB Script 0 08-22-2008 02:47 AM
HP6980 will not Automatically do Duplex with Duplex Hardware Dave Vista print fax & scan 1 07-07-2007 05:20 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51