0

When trying to call a WCF service I receive the following error:

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

The Goog tells me that the solution is as follows (when using .net 3.5, which I am):

  <baseAddressPrefixFilters> 
    <add prefix="http://mydomain.com.au"/> 
  </baseAddressPrefixFilters> 

However, when I try to add this to the section of my web.config it tells me it is invalid.

  • I have the similar problem...can u help me? [My question][1] [1]: http://stackoverflow.com/questions/9152348/windows-service-on-shared-windows-hosting – faisal00813 Feb 05 '12 at 20:23

1 Answers1

0

You should use this instead in 3.5:

    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>

if you move to 4.0 you can use svc less activation as shown here: ServiceRoute + WebServiceHostFactory kills WSDL generation? How to create extensionless WCF service with ?wsdl

Community
  • 1
  • 1
Leblanc Meneses
  • 3,001
  • 1
  • 23
  • 26
  • I tried multipleSiteBindingsEnabled earlier and it says "Attribute not allowed". I would use .net 4 but my host only supports 3.5. I miss having my own dedicated server :( –  Oct 18 '11 at 02:31
  • i just noticed multipleSiteBindingsEnabled is a 4.0 feature. Your going need to do this with code (I remember having a similar problem and finding an wcf extension that supported this) however try this link: http://stackoverflow.com/questions/508892/multiple-base-addresses-in-single-wcf-service – Leblanc Meneses Oct 18 '11 at 03:57