WCF Service error: "This collection already contains an address with scheme http."

Date posted: 2011-12-27
Last updated: 2026-10-03

How to fix the WCF error "This collection already contains an address with scheme http" for services on multiple IIS bindings, in .NET 3.5 and 4.x.

"This collection already contains an address with scheme http. There can be at most one address per scheme in this collection." is a Windows Communication Foundation (WCF) error message indicating you are trying to add an already existing binding. By default the web service listens to all host headers configured in IIS. A host header is the website address, for example example.com and www.example.com. If this is not correctly configured in the web.config file, WCF throws the error shown below.

A WCF service in an IIS website with multiple bindings fails because WCF allows only one base address per scheme. In .NET 3.0/3.5, filter the base address with baseAddressPrefixFilters and use absolute endpoint addresses; from .NET 4.0 on, set multipleSiteBindingsEnabled="true".

I originally wrote this post in 2011, for WCF services in .NET Framework 2.0 to 4.5 on IIS. The fix still applies to WCF on .NET Framework 4.8. WCF server-side hosting is not part of modern .NET; CoreWCF is the community port for it.

Server Error in MultipleBindings Application

This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.

With a correctly configured web.config it's quite possible to host the service on two URLs, for example https://payment.example.com:443 and https://payment.example.com:9000.

Fixes for "WCF Server Error in MultipleBindings Application" in different .NET Framework versions

Different .NET Framework versions have different solutions for this error.

Fix for .NET 2.0/3.0/3.5

1. Set a baseAddressPrefixFilters prefix for one of the two URLs in the web.config file:

<system.serviceModel>
  <serviceHostingEnvironment>
    <baseAddressPrefixFilters>
      <add prefix="https://payment.example.com:443"/>
    </baseAddressPrefixFilters>
  </serviceHostingEnvironment>
</system.serviceModel>

2. Add both endpoint URLs as absolute URLs in the web.config file:

<services>
  <service>
    <endpoint 
      address="https://payment.example.com:443/Service1.svc/EP1"
      binding="..."
      contract="..." />
    <endpoint address="https://payment.example.com:9000/Service1.svc/EP12"
      binding="..."
      contract="..." />
  </service>
</services>

Fix for ASP.NET 4.0/4.5

ASP.NET 4.0/4.5 has a multipleSiteBindingsEnabled web.config configuration option available, to support multiple site bindings for services. Keep this in mind when you port your 3.0/3.5 application to 4.0.

<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

For ASP.NET 4.0/4.5 you first must install the NET-HTTP-Activation and NET-WCF-HTTP-Activation features in IIS. Verify the *.svc handler is added to IIS after installation.

Is your service returning a 404 instead? Read why a .svc WCF web service returns 404 Not Found in IIS.

References and more information

I write these posts in my spare time, based on real problems from my day job as a sysadmin. If this one saved you some debugging time, a small donation is much appreciated. Thanks! 🙏

Leave a Comment