This collection already contains an address with scheme http. Multiple Binding issue IIS

Posted: 2012-02-20 in .Net

This collection already contains an address with scheme http. 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

Got that? Then you obviously want multiple bindings to a web site

Add this to your web config in the system.serviceModel section:

 <system.serviceModel>
  <serviceHostingEnvironment multipleSiteBindingsEnabled=”true”/>
 </system.serviceModel>

 

Stop and restart the application pool and you should no longer have “that”

Advertisements
Comments
  1. Geo says:

    In my experience, the only works on .Net 4.0.

    On other platforms, you must use:

    • Choco Smith says:

      Hi Geo,
      Thanks for the heads up with this only working for 4.0

      Word press for some reason has started to strip xml from post, its sort of why above i put it in a quote.

      I did a little more research and tested on an old 3.5 web service site we have and found the below to work.
      If this seems wrong please try post again.

      So for you .net 3.5 old timers (remember 4.5 is just around the corner)
      in service model tag add:

      <serviceHostingEnvironment>
      <baseAddressPrefixFilters>
      <add prefix=”http://www.yourdomain.com”/>
      </baseAddressPrefixFilters>
      </serviceHostingEnvironment>

      you might also need to add update the COMPLETE address attribute in the endpoint tag ‘basicHttpBinding’

      <endpoint address=”http://www.yourdomain.com/service.svc”
      </endpoint>

      Cheers
      Choco

      EDIT: WOW wordpress is really annoying atm, te only way to get xml in is to replace all the less than with the html equivlnt &lt then semi column

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s