Click here to Skip to main content
15,894,630 members
Articles / Desktop Programming / WPF

Scalable Asynchronous Duplex Communication Between WPF and WCF

Rate me:
Please Sign up or sign in to vote.
4.85/5 (12 votes)
4 Sep 2011CPOL5 min read 47.1K   2K   49  
Scalable duplex communication between WPF and WCF.
<?xml version="1.0"?>
<configuration>

  <system.web>
    <compilation debug="true" targetFramework="4.0" />    
  </system.web>
  <system.serviceModel>

    <services>
      <service name="StockService.SessionsController">
        <endpoint address="SessionsController" binding="wsDualHttpBinding" contract="StockService.Interfaces.ISessionsController" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:50203"/>
          </baseAddresses>
        </host>
      </service>

      <service name="StockService.ServiceWithCallback">
        <endpoint address="ServiceWithCallback" binding="wsDualHttpBinding" contract="StockService.Interfaces.IServiceWithCallback" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:50203"/>
          </baseAddresses>
        </host>
      </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="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>

    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
  
</configuration>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
Ireland Ireland
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions