Centralizing and simplifying WCF configuration with SO-Aware part II: Configuration models

In previous posts I've described how we can use SO-Aware to centralize the configuration of WCF services avoiding the need of maintaining complex configuration files across services and clients. The mechanism is enabled by a custom WCF service host which downloads the configuration from SO-Aware's OData feed and reconfigures the target WCF service

The current version of SO-Aware enables a couple of models for centralizing and simplifying WCF configuration: service-centric and binding/behavior-centric. Let's explore both model using a sample WCF service configured with the ws2007HttpBinding and the mutual certificates security profile. To enable this scenario, the binding configuration should be stored in SO-Aware as shown in the following figure.

Config[1]

Similarly, the behavior used to configure the certificate credentials can also be configured in SO-Aware as illustrated in the following figure.

CertBehavior[1]

Our sample service is configured in SO-Aware using the bindings and behaviors explained above. The highlighted sections in the following two figures illustrate this process.

ServiceCredentialsBehaviorConfig[1]

CertBindingConfig[1]

At this point, we can reuse SO-Aware’s configuration in our sample WCF service. The current version of SO-Aware enables two fundamental models for accomplishing that: service-centric or binding/behavior centric.

Service-centric

On this model the entire service configuration will be driven by SO-Aware. This entails service and endpoint configurations including bindings and behaviors. We can enable this model by indicating the service version to be configured using the name attribute of the service configuration section as illustrated in highlighted section of the the following code.

1: <serviceRepository

url="http://localhost:9999/SOAwarePortal/ServiceRepository.svc">

   2:     <services>
   3:        <service name="ref:CRMSOAPService(1.0)@dev" 
   4:                 type="Tellago.ServiceModel.Governance.Samples.CRMSOAPService, 
   5:                     Tellago.ServiceModel.Governance.Samples.SOAPServices"/>
   6:     </services>
   7: </serviceRepository>

 

Binding/Behavior-centric

This model represents an alternative to the service-centric model on which we can configure the specific bindings and behaviors that should be configured from SO-Aware. The following code illustrate that model.

 

   1: <serviceRepository 
   2:      url="http://localhost:9999/SOAwarePortal/ServiceRepository.svc">
   3:     <services>
   4:       <service name="Tellago.ServiceModel.Governance.Samples.CRMSOAPService"
   5:   behaviorConfiguration="ref:ServiceCredentialsBehavior">
   6:  
   7:          <endpoint binding="ws2007HttpBinding" 
   8:            bindingConfiguration="ref:MutualCertBinding"
   9:            contract="Tellago.ServiceModel.Governance.Samples.ICRMService" >
  10:          </endpoint>
  11:       </service>
  12:     </services>
  13: </serviceRepository>

Whether the service-centric models definitely offers a more transparent model for simplifying WCF configuration, the binding-behavior-centric model allows the developer to use specific bindings or behaviors already deployed in SO-Aware’s repository.

As always, remember you can download the express edition of SO-Aware at http://www.tellagostudios.com/download

1 Comment

  • I have to ask: Why do you keep the Foundation Expression Blend book close to hand? It's not a reference book, it's a turotial. It was written to an early beta so has huge chunks of out of date and misleading information. It's missing important stuff (there's stuff promoted on the back cover that's not even in the book) One chapter has a huge section that is almost an exact cut and paste copy of the previous chapter, the editing on the book has been so poor. So I have to ask again, what is it about the book that makes it a must keep within reach ? When books like Silverlight in Action , Silverlight Unleashed , Pro Silverlight 3 or (for Blend) Jeff Paries Silverlight Animation with Blend AREN'T on your list I'm totally confused by the inclusion of this book when other so much better books apparently haven't made the grade.

Comments have been disabled for this content.