Ray Saltrelli
http://www.mappinganalytics.com
@raysaltrelli
Software engineer at Mapping Analyitics in Rochester, NY.
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Software engineer at Mapping Analyitics in Rochester, NY.
Duplex Communication with WCF in Silverlight 4 (Silverlight TV #34)
Oct 24, 2011 at 7:25 AMHi Tomasz,
I'm trying to write a subscription service similar to this chat service. Below is my web.config:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<extensions>
<bindingElementExtensions>
<add name="pollingDuplex" type="System.ServiceModel.Configuration.PollingDuplexHttpBindingElement, System.ServiceModel.PollingDuplex, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</bindingElementExtensions>
</extensions>
<bindings>
<customBinding>
<binding name="MAD.ChangeNotificationServices.SubscriptionService.customBinding0">
<binaryMessageEncoding />
<pollingDuplex duplexMode="MultipleMessagesPerPoll"></pollingDuplex>
<httpTransport />
</binding>
</customBinding>
</bindings>
<services>
<service name="MAD.ChangeNotificationServices.SubscriptionService">
<endpoint address="" binding="customBinding" bindingConfiguration="MAD.ChangeNotificationServices.SubscriptionService.customBinding0"
contract="MAD.ChangeNotificationServices.ISubscriptionService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- 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="false"/>
<serviceThrottling maxConcurrentSessions="2147483647"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
When I use SingleMessagePerPoll as my duplex mode, everything works fine. But when I switch to MultipleMessagesPerPoll, calls to the subscription service result in an operation timeout after 1 minute. If I place a break point in the method I am calling in the subscription service, the break point is never hit. Do you have any wisdom to share?