Tuesday, June 15, 2010

WCF Services and IIS Hosting

Recently i ran into some problems with publishing a WCF Service to an IIS host. Looked like there were more then one hostheaders defined in IIS, and on only one our service is running.


By adding some code into the system.serviceModel section of the web.config the problem is solved.
<serviceHostingEnvironment>
      <baseAddressPrefixFilters>
        <add prefix="http://www.yourwebsitehere.nl"/>
      </baseAddressPrefixFilters>
    </serviceHostingEnvironment>

No comments:

Post a Comment