UnityContainer.Resolve in a WCF Service using Security mode of Transport seems to load on a different thread

Dec 28, 2010 at 8:15 PM
Edited Dec 28, 2010 at 8:15 PM

I have a WPF service that uses a Singleton instance of a Unity container to resolve a type. The Resolution of this type appears to be on a different thread or HTTP context . This only happens if the security mode of the binding is Transport. Is there a reason why or am I doing something wrong? Let me know if you need a code sample.


Dec 30, 2010 at 6:21 PM

Well, I can assure you that Unity doesn't do anything to cause thread switching. If resolve is being called from multiple threads, that's because WCF is calling it from multiple threads. I'm not much of a WCF guy, so I can't really comment beyond that.