I have been lately working on a WCF version of the gallery engine that I use for my photo gallery. Since I have been using shared hosting server, I had few issues in getting WCF services working on my account.
First up seems like few of the DLL’s were missing, and I when I finished up sorting everything I came across another error This collection already contains an address with scheme http.
Well it seems like WCF doesn’t like to have IIS serving service on address more than one address for instance, http://www.mydomian.com.au and http://mydomain.com.au.
Easiest way to fix this issue is to specify your base address prefix in the web.config file. To do so, you just need to specify following lines in the serviceModel section.
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true">
<baseAddressPrefixFilters>
<add prefix="http://mydomain.com.au"/>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
and once you deploy the service, everything starts working :)
Enjoy!


