Using Ninject with WCF Services within Web Application's Appdomain?

681 views Asked by At

It's my understanding that if you want to use the WCF-Ninject extension, it assumes that you are hosting your WCF services in their own AppDomain.

I'm already using the Ninject.Web extension and asp.net compatibility mode to get at the Membership Provider and Session.

Is there a way utilize my Ninject with my WCF services that are hosted in the same AppDomain as my Web Application?

1

There are 1 answers

1
Ruben Bartelink On BEST ANSWER

Well, Ninject.Web is just code - go have a look at it.

Things like InRequestScope will just work if you're using asp.net compatibility mode.

You havent really explained which bit of the WCF support you want -- e.g., the base class you use for services can easily be lifted out of Ninject.Wcf and doesnt require the same type of integration that is necessary for Ninject.Web, e.g., NinjectHttpApplication.

I suggest:

  1. looking at Ninject.Wcf
  2. getting some more details together about what you want/need/epect
  3. mailing the ninject mailing list to talk through what you're talking about