WCF 'one address per scheme in this collection' error

It might occur that you have developed a WCF service, which works perfectly on your development environment, but gives the following error when it is deployed on your hosting environment:

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

A workaround for this problem has been described in this MSDN forum topic (in the second to last post). By modifying specific values for the serviceHostingEnvironment node, as presented in the code example below, the WCF service should also run on your development environment :

<system.serviceModel>
	<serviceHostingEnvironment>
		<baseAddressPrefixFilters>
			<add prefix="http://www.example.com"/>
		</baseAddressPrefixFilters>
	</serviceHostingEnvironment>
</system.serviceModel>

Regards, Wez.

19. February 2010 23:29 by Wez | Comments (0) | Permalink

About the author

Wesly van Zoen is a .Net Software Developer, working at HUMIQ.

Tag cloud

    Month List

    Page List