Answered by:
pollingDuplexHttpBinding - Super Slow / Delay

Question
-
Hi ,
I'm trying few days to googling and fix it , but only fails , ( found few posts about the subject , but failed , or didn't undetstand )
My WCF Service connects to WPF application wsDualHttpBinding without problem , very fast , any service publish event I get it on the second.
with Silverlight , pollingDuplexHttpBinding , I get the service publish event after 30+- seconds delay after the WPF app got it,
I though about going to TCP which is much faster as I read , but I prefer fix this if possbile (configuration is ready ^^ )
( can both Silverlight&WPF connecrt to the TCP binding ? )
Tried both deploy on IIS with debug=false , same,
Silverlight Client Code :
var address = new EndpointAddress("http://localhost/TheWCFSevice/Service1.svc/pollingDuplexHttpBinding"); var binding = new PollingDuplexHttpBinding(PollingDuplexHttpSecurityMode.None) { InactivityTimeout = TimeSpan.FromMinutes(60), ReceiveTimeout = TimeSpan.FromMinutes(60), MaxReceivedMessageSize = 2147483647, MaxBufferSize = 2147483647, OpenTimeout = TimeSpan.FromMinutes(5), CloseTimeout = TimeSpan.FromMinutes(5), DuplexMode = PollingDuplexMode.MultipleMessagesPerPoll, SendTimeout = TimeSpan.FromMinutes(5), }; ObjProxy = new WCFService.Service1Client(binding, address);
WCF Service - Web.config :
<system.serviceModel>
<!-- Register the binding extension from the SDK. -->
<extensions>
<bindingExtensions>
<add name="pollingDuplexHttpBinding"
type="System.ServiceModel.Configuration.PollingDuplexHttpBindingCollectionElement,
System.ServiceModel.PollingDuplex,
Version=4.0.0.0,
Culture=neutral,
PublicKeyToken=31bf3856ad364e35" />
</bindingExtensions>
</extensions><bindings>
<wsDualHttpBinding>
<binding name="wsDualHttpBinding"
maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647"
maxStringContentLength="2147483646"
maxArrayLength="2147483646"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
</binding>
</wsDualHttpBinding>
<pollingDuplexHttpBinding>
<binding name="multipleMessagesPerPollPollingDuplexHttpBinding"
duplexMode="MultipleMessagesPerPoll"
maxOutputDelay="00:00:30"
maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647"
maxStringContentLength="2147483646"
maxArrayLength="2147483646"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
</binding>
</pollingDuplexHttpBinding>
</bindings><services>
<service behaviorConfiguration="" name="TheWCFService.Service1"><endpoint address="wsDualHttpBinding"
binding="wsDualHttpBinding"
bindingConfiguration="wsDualHttpBinding"
contract="TheWCFService.IService1">
<identity>
<dns value="localhost" />
</identity>
</endpoint><endpoint
address="mex"
binding="mexHttpBinding"
bindingConfiguration=""
contract="IMetadataExchange" /><endpoint
address="pollingDuplexHttpBinding"
binding="pollingDuplexHttpBinding"
bindingConfiguration="multipleMessagesPerPollPollingDuplexHttpBinding"
contract="TheWCFService.IService1">
</endpoint><host>
<baseAddresses>
<add baseAddress="http://localhost:8732/Service1/" />
</baseAddresses>
</host></service>
</services><behaviors>
<serviceBehaviors>
<behavior name="">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="6553600"/>
<serviceThrottling maxConcurrentSessions="500" maxConcurrentCalls="500" maxConcurrentInstances="500" />
</behavior>
</serviceBehaviors>
</behaviors><serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>Thanks!
Sunday, September 2, 2012 5:05 AM
Answers
-
Tried both deploy on IIS with debug=false , same,
Hi Zakos,
Did you get some error message when you browse the service in browser?
And suggest you turn on WCF tracing at both sevice and client (the web app) side to get some detailed error information.
Configuring Tracing refer: http://msdn.microsoft.com/en-us/library/ms733025.aspx
Best Regards,
Monday, September 3, 2012 4:13 AMModerator -
Hi Zakos,
After futher research, it seems that you are hiting an existing issue of hosting multiple WCF servcies in web application and one of them uses PollingDuplexHttpBinding.
Here is a blog mentioned this and provide a workaround:
Best Regards,
Tuesday, September 11, 2012 2:43 AMModerator
All replies
-
Tried both deploy on IIS with debug=false , same,
Hi Zakos,
Did you get some error message when you browse the service in browser?
And suggest you turn on WCF tracing at both sevice and client (the web app) side to get some detailed error information.
Configuring Tracing refer: http://msdn.microsoft.com/en-us/library/ms733025.aspx
Best Regards,
Monday, September 3, 2012 4:13 AMModerator -
No errors ,
Edit:
have logs , no idea what I'm looking at...
Monday, September 3, 2012 7:58 AM -
Hi Zakos,
After futher research, it seems that you are hiting an existing issue of hosting multiple WCF servcies in web application and one of them uses PollingDuplexHttpBinding.
Here is a blog mentioned this and provide a workaround:
Best Regards,
Tuesday, September 11, 2012 2:43 AMModerator