This project is read-only.

Associate names with the service configuration when you create service behavior, endpoint behavior, and binding configuration

J.D. Meier, Jason Taylor, Prashant Bansode, Carlos Farre, Madhu Sundararajan, Steve Gregersen.

When updating or creating a new service configuration, make sure you set the appropriate attributes to the reference names of service behavior, endpoint behavior and biding configuration.

This is important to make sure the changes to service behavior, endpoint behavior and biding configuration are applied correctly to the WCF service at runtime.

The following code shows how the behaviors and the binding configuration with WebHttpBinding are associated with a service

    <binding name="*MyWebHttpBinding*" />

   <service behaviorConfiguration="*MyServiceBehaviorForWebHttp*" name="Service">
    <endpoint address="" behaviorConfiguration="*MyEndpointBehaviorForWebHttp*"
     binding="webHttpBinding" bindingConfiguration="*MyWebHttpBinding*"
     name="*MyEndpointWebHttp*" contract="IService">
      <dns value="localhost" />

    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />


    <behavior name="*MyEndpointBehaviorForWebHttp*">
     <enableWebScript />

    <behavior name="*MyServiceBehaviorForWebHttp*">
     <serviceMetadata httpGetEnabled="true" />
     <serviceDebug includeExceptionDetailInFaults="false" />


Last edited Apr 24, 2008 at 12:46 AM by prashantbansode, version 2


No comments yet.