How do I use StructureMap in a WCF 4.0 REST service?
I’ve used StructureMap in the past using this article but the technique doesn’t seem to work with the WebServiceHostFactory(). What’s the secret?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I got it to work following this example. Essentially you write a customer
BehaviorExtensioninstead of aServiceHostFactoryand life is good.Would still appreciate any understanding as to why using a custom
WebServiceHostFactorydoesn’t work. It appeared to wire everything up correctly but myIInstanceProvider‘sGetInstance()method was never being called.