I can't get my WCF service to work with more than one http binding.
In IIS 7 I have to bindings http:/service and http:/service.test both at port 80.
In my web.config
I have added the baseAddressPrefixFilters but I can't add
more than one
<serviceHostingEnvironment>
<baseAddressPrefixFilters>
<add prefix="http://service"/>
<add prefix="http://service.test"/>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
This gives almost the same error
This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
as if no filers were specified at all (This collection already contains an address with scheme http. There can be at most one address per scheme in this collection. Parameter name: item)
If I add only one filter then the service works but only responds on the added filter address.
I've also tried with specifing multiple endpoints like (and only one filter):
<endpoint address="http://service.test" binding="basicHttpBinding" bindingConfiguration="" contract="IService" />
<endpoint address="http://service" binding="basicHttpBinding" bindingConfiguration="" contract="IService" />
Then still only the address also specified in the filter works and the other returns this error:
Server Error in Application "ISPSERVICE" HTTP Error 400.0 - Bad Request
Regards Morten