PollingDuplex doesn't work in IIS Express-VBForums
Results 1 to 4 of 4

Thread: PollingDuplex doesn't work in IIS Express

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2010
    Posts
    164

    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

    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>

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Aug 2010
    Posts
    164

    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
    Location
    Eygelshoven
    Posts
    1,572

    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
    Posts
    259

    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.

    Code:
    <system.diagnostics>
        <sources>
          <source name="System.ServiceModel" switchValue="Error" propagateActivity="true">
            <listeners>
              <add name="ServiceTraceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="C:\Temp\MyTrace.log" />
            </listeners>
          </source>
        </sources>
      </system.diagnostics>
    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
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.