I'm having similar issues when trying to share an existing Unity container with a new WCF project in my solution.
I have created the UnityInstanceProvider,UnityServiceBehavior,UnityServiceHost and UnityServiceHostFactory classes
, and I think everything is fine as far as starting and hosting the service.
When I have an empty constructor for my WCF service, I'm able to run the test methods on the service just fine, but
, when I include a constructor parameter in my WCF service (my dataService class), it fails.
Here's my WCF constructor:
public CHKShotWCFService(IWellHeaderService wellHeaderService)
_wellHeaderService = wellHeaderService;
//_wellHeaderService = new WellHeaderService();
Will you please explain how you're using the singleton UnityProvider, I think that may be where I'm doing something wrong.
Currently, i'm using a Bootstrapper project that I created in order to separate the unity container management.
It has all of the .RegisterType statements, including the .RegisterType<IWellHeaderService, WellHeaderService>() that
i'm trying to use with my WCF service.
Originally the BootStrapper code was incorporated into the main web application project, but I was having circular reference issues
, so it made sense to bust it out into it's own project, with the web app and the WCF service both referencing it.
Well, the web app is working fine, but the WCF service is still throwing "Assembly not found" errors.
I can include more of my source code if you need it, but I'll hold off for now, so I don't inundate you with code
you don't want to see.
Thanks in advance.