title: WCF Error : Manual addressing is enabled on this factory, so all messages sent must be pre-addressed
body: <p>I've got a hosted WCF service that I created a custom factory for, so that this would work with multiple host headers:</p>
  
  <pre><code>/// &lt;summary&gt;
  /// Required for hosting where multiple host headers are present
  /// &lt;/summary&gt;
  public class MultipleHostServiceFactory : ServiceHostFactory
  {
      protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
      {
          List&lt;Uri&gt; addresses = new List&lt;Uri&gt;();
          addresses.Add(baseAddresses[0]);
          return base.CreateServiceHost(serviceType, addresses.ToArray());
      }
  }
  </code></pre>
  
  <p>I'm pretty sure that my config files are now right, on both client and server (<a href="https://stackoverflow.com/questions/1794247/wcf-consumer-website-returning-the-address-property-on-channelfactory-endpoint-wa">can be seen here</a>).</p>
  
  <p>The error I'm getting appears to be related to the factory:</p>
  
  <p>Manual addressing is enabled on this factory, so all messages sent must be pre-addressed.</p>
  
  <pre><code>public string GetData(int value) {
      return base.Channel.GetData(value);
  }
  </code></pre>
  
  <p>The error occurs at line <code>return base.Channel.GetData(value);</code>.</p>