Results 1 to 4 of 4
  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2010

    PollingDuplex doesn't work in IIS Express

    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

        <compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
        <defaultDocument enabled="true">
                <add value ="DuelPortalOnlineTestPage.html"/>
                <add value="ClientBin/DuelPortalOnline.xap"/>
            <service name="DuelPortalOnline.Web.ChatService" >
                <endpoint address="" binding="pollingDuplex" bindingConfiguration="myPollingDuplex"
                    contract="DuelPortalOnline.Web.ChatService"  behaviorConfiguration="duplexBehavior" />
                <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
                <!-- 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=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
                <behavior name="duplexBehavior">
                    <serviceMetadata httpGetEnabled="true"  />
                    <serviceDebug includeExceptionDetailInFaults="true" />    
                <binding name="myPollingDuplex" duplexMode="MultipleMessagesPerPoll" >
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
            multipleSiteBindingsEnabled="true" />

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Aug 2010

    Re: PollingDuplex doesn't work in IIS Express

    Does anyone have any ideas? After some testing I know it's not a firewall issue. What's so different about iis local and iis express?

  3. #3
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002

    Re: PollingDuplex doesn't work in IIS Express

    You could try to adjust the .config so the full error message is revealed, that might help
    VB6 & C# (WCF LINQ) mostly

    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  4. #4
    Hyperactive Member
    Join Date
    Jan 2010

    Re: PollingDuplex doesn't work in IIS Express

    I have never use pollingDuplex, but my I ask why you are using it? It seems harder to use than it is worth.

    Since it is a chat application, when the server receives a message the server should push to the clients, which you can accomplish with simple duplex calls. Just define a callback on the service contract and make the operational contract that should update the clients one way. Then when you add a service reference to the client, it will automatically create the callback interface that you will have to flesh out.

    With this you have a place for the service to "talk" to the client and you can also define events so when the callback gets a message, you raise an event the client is subscribed to.

    If you REALLY want to use the polling, do as lighting suggests and get more detail on the error. Add a Trace to the config file and look it over.

          <source name="System.ServiceModel" switchValue="Error" propagateActivity="true">
              <add name="ServiceTraceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="C:\Temp\MyTrace.log" />
    Last edited by wakawaka; Jan 8th, 2013 at 04:36 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.