Spaces in type attribute for Behavior Extension Configuration Issues

Posted by Shawn Cicoria on Geeks with Blogs See other posts from Geeks with Blogs or by Shawn Cicoria
Published on Thu, 10 Jun 2010 18:04:00 GMT Indexed on 2010/06/11 0:23 UTC
Read the original article Hit count: 207

Filed under:

If you’ve deployed your WCF Behavior Extension, and you get a Configuration Error, it might just be you’re lacking a space between your “Type” name and the “Assembly” name.

You'll get the following error message:

Verify that the extension is registered in the extension collection at system.serviceModel/extensions/behaviorExtensions

image

So, if you’ve entered as below without

<system.serviceModel>
  <extensions>
    <behaviorExtensions>
      <add name="appFabricE2E"
           type="Fabrikam.Services.AppFabricE2EBehaviorElement,Fabrikam.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
    </behaviorExtensions>
  </extensions> 

The following will work – notice the additional space between the Type name and the Assembly name:

<system.serviceModel>
  <extensions>
    <behaviorExtensions>
      <add name="appFabricE2E"
           type="Fabrikam.Services.AppFabricE2EBehaviorElement,Fabrikam.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
    </behaviorExtensions>
  </extensions> 

© Geeks with Blogs or respective owner