-
Notifications
You must be signed in to change notification settings - Fork 53
Setup selfhosted WCF services
remogloor edited this page Feb 18, 2013
·
6 revisions
Selfhosting of WCF services is based on Ninject.Web.Common.SelfHosting. To use it you have to follow the documentation of this package.
Once this is done you can define WCF service configurations using the static methods on NinjectWcfConfiguration. The simplest variant is to specify what factory shall by used for a service type
```text
NinjectWcfConfiguration.Create();
NinjectWcfConfiguration.Create();
```
There are other overloads that allow to configure the service host by specifying an action that is executed when the service host is created.
```text
NinjectWcfConfiguration.Create(
servicehost => servicehost.AddServiceEndpoint( ... ));
```
The WCF services can be configured using the usual way in the section of the App.config