title: Why does my WCF service give the message 'does not have a Binding with the None MessageVersion'?
body: <p>I have created a working WCF service. I now want to add some security to it to filter Ip Addresses. I have followed the example that microsoft publish in the samples to try and add a IDispatchMessageInspector that will raise a call AfterReceiveRequest and then throw an error if the ip address is not from the allowed list. </p>
  
  <p>After looking at the code; they have configured it using 'wsHttpBinding', however I want to use 'webHttpBinding' or 'basicHttpBinding'. But when I set it up I get the error:</p>
  
  <blockquote>
    <p>The endpoint at 'http://upload/api/Api.svc/soap' does not have a
    Binding with the None MessageVersion. 
    'System.ServiceModel.Description.WebHttpBehavior' is only intended for
    use with WebHttpBinding or similar bindings.</p>
  </blockquote>
  
  <p>My configuration is:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
  
  
      &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true"&gt;
      &lt;/serviceHostingEnvironment&gt;
      &lt;!--Set up the service--&gt;
      &lt;services&gt;
        &lt;service behaviorConfiguration="SOAPRESTDemoBehavior" name="HmlApi"&gt;
          &lt;endpoint address="rest" binding="webHttpBinding" contract="VLSCore2.Interfaces.IHmlApi" behaviorConfiguration="SOAPRESTDemoEndpointBehavior" /&gt;
          &lt;endpoint address="soap" binding="basicHttpBinding" contract="VLSCore2.Interfaces.IHmlApi" behaviorConfiguration="SOAPRESTDemoEndpointBehavior" /&gt;
        &lt;/service&gt;
      &lt;/services&gt;
  
      &lt;!--Define the behaviours--&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="SOAPRESTDemoBehavior"&gt;
            &lt;serviceMetadata httpGetEnabled="true" /&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
  
        &lt;!---Endpoint --&gt;
        &lt;endpointBehaviors&gt;
          &lt;behavior name="SOAPRESTDemoEndpointBehavior"&gt;
            &lt;ipFilter/&gt;
            &lt;webHttp /&gt;
          &lt;/behavior&gt;
        &lt;/endpointBehaviors&gt;
      &lt;/behaviors&gt;
  
      &lt;extensions&gt;
        &lt;behaviorExtensions&gt;
          &lt;add name="ipFilter" type="VLSCore2.Api.IpFilterBehaviourExtensionElement, VLSCore2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/&gt;
        &lt;/behaviorExtensions&gt;
      &lt;/extensions&gt;
  
    &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>So what im wondering is how I can set up my message inspector without using WebHttpBinding. Is this even possible?</p>
  
  <p>I want to use SOAP 'basicHttpBinding' not wsHttpBinding (and all of the WS*) associated overheads....</p>