title: Adding a custom wcf behavior extension causes a ConfigurationErrorsException
body: <p>I want to add a behavior extension so that my service classes will be instantiated with Ninject. I created a class that inherits from BehaviorExtensionElement and registered it in my App.config. I cannot see anything obvious I'm missing, yet on startup this is thrown:</p>
  
  <pre><code>System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for system.serviceModel/behaviors: Extension element TestExtension cannot be added to this element. Verify that the extension is registered in the extension collection at system.serviceModel/extensions/behaviorExtensions.
  Parameter name: element (...\MyAssembly.dll.config line 42) ---&gt; 
  System.ArgumentException: Extension element TestExtension cannot be added to this element. 
  Verify that the extension is registered in the extension collection at system.serviceModel/extensions/behaviorExtensions.
  Parameter name: element
  </code></pre>
  
  <p>Here is my App.config:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
  &lt;extensions&gt;
    &lt;behaviorExtensions&gt;
      &lt;add name="TestExtension" type="Mynamespace.DependencyInjectionServiceBehavior,MyAssembly,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null" /&gt;
    &lt;/behaviorExtensions&gt;
  &lt;/extensions&gt;
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name="MyServiceBehavior"&gt;
        &lt;TestExtension/&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  &lt;/behaviors&gt;
  </code></pre>
  
  <p>Here is my behaviour class:</p>
  
  <pre><code>public class DependencyInjectionServiceBehavior : BehaviorExtensionElement, IServiceBehavior
  {
      public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase)
      {
          foreach (ChannelDispatcherBase cdb in serviceHostBase.ChannelDispatchers)
          {
              ChannelDispatcher cd = cdb as ChannelDispatcher;
              if (cd != null)
              {
                  foreach (EndpointDispatcher ed in cd.Endpoints)
                  {
                      ed.DispatchRuntime.InstanceProvider =
                          new DependencyInjectionInstanceProvider(serviceDescription.ServiceType);
                  }
              }
          }
      }
  
      public void Validate(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase)
      {
      }
  
      public void AddBindingParameters(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase,
          Collection&lt;ServiceEndpoint&gt; endpoints, BindingParameterCollection bindingParameters)
      {
      }
  
      public override Type BehaviorType
      {
          get { return this.GetType(); }
      }
  
      protected override object CreateBehavior()
      {
          return new DependencyInjectionServiceBehavior();
      }
  
  }
  </code></pre>