I have a Silverlight 4 chat program that uses a WCF service with pollingDuplexHttpBinding.
The program works OK In:
* Cassini
* IIS Local Web Server
* All non-Duplex WCF Services work fine in any setting
But it does NOT work in IIS 7.5 Express. A call is made but a 500 HTTP error is given, and nothing happens (no exceptions are thrown, program just ignores it)
Here's my Web.Config
Code:<configuration> <system.web> <compilation debug="true" strict="false" explicit="true" targetFramework="4.0" /> </system.web> <system.webServer> <defaultDocument enabled="true"> <files> <add value ="DuelPortalOnlineTestPage.html"/> <add value="ClientBin/DuelPortalOnline.xap"/> </files> </defaultDocument> </system.webServer> <system.serviceModel> <services> <service name="DuelPortalOnline.Web.ChatService" > <host> <baseAddresses> </baseAddresses> </host> <endpoint address="" binding="pollingDuplex" bindingConfiguration="myPollingDuplex" contract="DuelPortalOnline.Web.ChatService" behaviorConfiguration="duplexBehavior" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services> <extensions> <bindingExtensions> <!-- This is added when VS doesn't recognize the dll reference right away <add name="pollingDuplex" type="System.ServiceModel.Configuration.PollingDuplexHttpBindingCollectionElement,System.ServiceModel.PollingDuplex, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> --> </bindingExtensions> </extensions> <behaviors> <serviceBehaviors> <behavior name="duplexBehavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors> <bindings> <pollingDuplex> <binding name="myPollingDuplex" duplexMode="MultipleMessagesPerPoll" > </binding> </pollingDuplex> </bindings> <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> </system.serviceModel>


Reply With Quote