WCF Service: This collection already contains an address

Published by

Posted on August 16, 2009

Error: This collection already contains an address with the scheme HTTP

I wont go into much detail about this topic as I am fairly new to it also .. lol

The WCF service does not work within a shared environment without patching your application some. By default the application is retrieving the baseheader binded to the port which returns the servers hostname . You will need to extend the ServiceHostFactory class into your application. This will allow you to modify the return value of the baseAddress. The following blog article may give your some guidance on setting this up.

MSDN
More information

Hosting and Consuming WCF Services