WCF configuration element: baseAddressPrefixFilters

I have read the documentation for this element, but still don't understand what its purpose is. Here is an example of how I saw it in the examples:

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

I want to understand what this means that the base addresses in the node service are not running. I do not understand what this element is really used for.

+6
wcf configuration-files
source share
1 answer

The WCF service host will only allow one base address per scheme (in this case, HTTP). Now, if you deploy the WCF service in IIS configured with several base addresses, for example http://www.example.com and http://example.com, you will see an error message. Using baseAddressPrefixFilters, you can filter out one of the two base addresses, and your service will work fine.

+8
source share

All Articles