This collection already contains an address with scheme Http RRS feed

  • Question

  • Hi,

    I want to have basic and Ws (over HTTP - Security is not a problem) and netTCP bindings at different urls.

    The code is below:-

    <service name="WCFService.IHelloService" behaviorConfiguration="MyDefaultBehaviour">			
    	<endpoint address="basicHttpAddress" binding="basicHttpBinding" contract="WCFService.IIHelloService"/>
    	<endpoint address="netTCPAddress" binding="netTcpBinding" contract="WCFService.IIHelloService"/>			
    	<endpoint address="wsBindingAddress"
    						  binding="wsHttpBinding" contract="WCFService.IIHelloService"
    	<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
    			<add baseAddress="http://localhost:8091/"/>
    			<add baseAddress="net.tcp://localhost:8095/"/>
    			<add baseAddress="http://localhost:8098/"/>					
    <Servicehostingenvironment multipleSiteBindingsEnabled = "true"/>

    Since i am having the multiple base address over the same protocol (http) i have also enabled multipleSiteBindingsEnabled .

    But still i am having the same problem.

    May i know how to solve this.



    Sunday, May 24, 2015 3:27 AM



    Based on your config file we can see that you have defined two baseAddresses for the http:

            <add baseAddress="http://localhost:8091/"/>
    	<add baseAddress="net.tcp://localhost:8095/"/>
    	<add baseAddress="http://localhost:8098/"/>					

    As far as I known it is not allowed, because if you have two http addresses, the basicHttpBinding and wsHttpBinding endpoint will have two http addresses. In my mind one service should have one http/https/net.tcp address, but it can have different kinds of address protocol for different binding type by enabling the multipleSiteBindingsEnabled. So please try to remove one http baseAddress, after that it should work.

    Best Regards,
    Amy Peng

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, May 25, 2015 3:39 AM