After my NinjectWebCommon class has run in App_start I then bind my WCF interfaces to services like this:
public static void LoadModules(IKernel kernel)
{
kernel.Bind<IAccountService>().To<WCFAccountService>();
}
How do I tell the system to accept WSHttpBinding calls to IAccountService ?
Here's my .svc for reference:
<%@ ServiceHost Language="C#" Debug="true"
Service="AAA.AAA.AAA.WCFAccountService"
Factory="Ninject.Extensions.Wcf.NinjectServiceHostFactory" %>
(Note: I'm using the Ninject.Extensions.Wcf and only BasicHttpBinding seems to work 'out of the box')
You need to configure the service in the web.config like
<service name="AAA.AAA.AAA.WCFAccountService" behaviorConfiguration="AAA.AAA.AAA.WCFAccountServiceBehavior">
<endpoint name="IAccountService" address="" binding="wsHttpBinding" contract="AAA.AAA.AAA.IAccountService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>