Unity.wcf and InstanceContextMode.Single
问题 I am using Unity.WCF to inject dependencies for WCF service. Problem occurs when I set my service to InstanceContextMode.Single . I found on Google that when InstanceContextMode is set to Single , InstanceProvider is not called. There is also a workaround for this but I was wondering if there is some built-in support for this in Unity.WCF because apparently this is a well known problem. I found the information here: Enabling InstanceProvider for singleton services. 回答1: I will cite Paul Hiles