- http://mysite.com/myservice.svc (WCF allows a single based address per scheme http/https)
IIS may be configured to support multiple base addresses like these:
- http://mysite.com
- http://www.mysite.com
<serviceHostingEnvironment>
<add prefix="http://www.mysite.com" />
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
This should eliminate the conflict, and the request should go to base address defined by the web.config. In addition, a common mistake is that the baseAddressPrefixFilters may be set to the same base address of the WCF service. This filters out the base address and causes the “Could not find base address error”. Following our previous scenario, if you add the setting below, the error will be recreated.
<serviceHostingEnvironment>
<baseAddressPrefixFilters><add prefix="http://mysite.com" /> (filters The wcf base address – error is shown)
<add prefix="http://www.mysite.com"/>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
I hope this helps.