I am trying configure a WCF endpoint to use a custom endpoint behavior extension but I keep running into this error message:
An error occurred creating the configuration section handler for system.serviceModel/behaviors: Extension element 'endpointMessageInspector' cannot be added to this element. Verify that the extension is registered in the extension collection at system.serviceModel/extensions/behaviorExtensions. Parameter name: element
My endpoint config looks like this:
<endpoint address="" binding="webHttpBinding" contract="Services.IGraphService"
behaviorConfiguration="corsMessageInspection"
bindingConfiguration="LargeMessageBinding"
bindingNamespace="http://some.domain.org">
</endpoint>
EndpointBehaviors:
<behavior name="corsMessageInspection">
<endpointMessageInspector />
</behavior>
BehaviorExtensions:
<behaviorExtensions>
<add name="endpointMessageInspector" type="Services.Cors.CorsEndPointExtensionElement, Services, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"/>
</behaviorExtensions>
I have read some other threads that say the type attribute vale of the behaviorExtension has to be exactly the same as the typeof the assembly for which the extension belongs. I keep checking and I cannot find a problem with this configuration.
Can someone tell me what I'm doing wrong?