Multiple host-headers and WCF services

When IIS is configured with multiple host-headers your WCF web.config has to be adjusted to use the correct prefix. Add the following sections to your system.serviceModel section:

<serviceHostingEnvironment>   
    <baseAddressPrefixFilters>   
        <add prefix="http://localhost:1122/"/>   
    </baseAddressPrefixFilters>   
</serviceHostingEnvironment>
Share

Leave a Reply

Your email address will not be published. Required fields are marked *