title: WCF: Multiple bindings on TCP.NET
body: <p>I am trying to set up a website under IIS 7.5 with multiple tcp.net bindings.</p>
  
  <p>Since the service is behind a loadbalancer I need multiple endpoints for the service:</p>
  
  <p>log.o1881.no/log/service.svc</p>
  
  <p>log.core1.o1881.no/log/service.svc</p>
  
  <p>this works for the http bindings when I configure in web.config:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
    &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true" /&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>The following error message appears when the following tcp.net bindings are added to the site:</p>
  
  <p>808:log.o1881.no</p>
  
  <p>808:log.core1.o1881.no</p>
  
  <p>Server Error in '/Log' Application.</p>
  
  <p>This collection already contains an address with scheme net.tcp.  There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'.
  Parameter name: item</p>
  
  <p>I also tried to add this to web.config:</p>
  
  <pre><code>&lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true"&gt;
    &lt;baseAddressPrefixFilters&gt;
      &lt;add prefix="net.tcp://log.o1881.no:808/log" /&gt;
      &lt;add prefix="net.tcp://log.core1.o1881.no:808/log" /&gt;
    &lt;/baseAddressPrefixFilters&gt;
  &lt;/serviceHostingEnvironment&gt;
  </code></pre>
  
  <p>This does however not work.</p>
  
  <p>Since the service will be deployed on multiple servers, I would very much like to be able to make this work through configuration and IIS setup, not in code.</p>
  
  <p>Is this possible to do, or is there another way to handle this scenario (multiple binding names on http and net.tcp, due to loadbalancing)?</p>