![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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.
br> br> |
| |||||||
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| 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 Specs![]() |
| | #2 (permalink) |
| 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 Specs![]() |
| 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 |