How to register two WCF service contracts with autofac
I have a WCF service that implements two service contracts... public class MyService : IService1, IService2 and I am self-hosting the service... host = new ServiceHost(typeof(MyService)); Everything was working fine when the service implemented only one service contract, but when I attempt to set up autofac to register both like this: host.AddDependencyInjectionBehavior<IService1>(_container); host.AddDependencyInjectionBehavior<IService2>(_container); ... it throws an exception on the second one, reporting: The value could not be added to the collection, as the collection already contains an