I have a WCF service hosted in IIS (7.0) which implements multiple service contracts and therefore defines multiple endpoints (one for each contract). It has been working fine but I have just added an https binding to the IIS web application and I am now getting an activation exception specifying that the service implements multiple contracts but no endpoints are defined in configuration when they actually are. I found this article which solves a similar problem caused by adding host names to IIS, but it doesn't seem to help my situation.
Here is a snippet of my configuration which is relevant:
<serviceHostingEnvironment aspNetCompatibilityEnabled="true">
<baseAddressPrefixFilters>
<add prefix="http://localhost/CDC.WebPortal.MidTierAccessService/"/>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
<services>
<service name="CDC.WebPortal.MidTier.MidTierAccessService"
behaviorConfiguration="MidTierServiceBehaviour" >
<endpoint address="http://localhost/CDC.WebPortal.MidTierAccessService/MidTierAccessService.svc"
binding="webHttpBinding" bindingName="RestBindingConfiguration"
contract="CDC.WebPortal.ServiceContract.IProductService"/>
<endpoint address="http://localhost/CDC.WebPortal.MidTierAccessService/MidTierAccessService.svc/Category" binding="webHttpBinding"
bindingName="RestBindingConfiguration"
contract="CDC.WebPortal.ServiceContract.ICategoryService"/>
<endpoint address="http://localhost/CDC.WebPortal.MidTierAccessService/MidTierAccessService.svc/Account" binding="webHttpBinding"
bindingName="RestBindingConfiguration"
contract="CDC.WebPortal.ServiceContract.IAccountService"/>
<endpoint address="http://localhost/CDC.WebPortal.MidTierAccessService/MidTierAccessService.svc/Order"
binding="webHttpBinding" bindingName="RestBindingConfiguration"
contract="CDC.WebPortal.ServiceContract.IOrderService"/>
<endpoint address="http://localhost/CDC.WebPortal.MidTierAccessService/MidTierAccessService.svc/mex"
binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
Any suggestions are appreciated.