I have a WCF 4 service with two endpoints configured to use wsHttpBinding and netTcpBinding. I host the service in IIS 7.5 using WAS and use the Ninject WCF extension for DI as a service. My service works fine when I use the wsHttpBinding endpoint to call my service, but it fails when using netTcpBinding. When I look in my application event log, I get the following error, described below.
I tried to debug the problem in VS2010, but nothing works with it. I do not want to remove Ninject from my WCF service, if at all possible. I understand that I can just use wsHttpBinding, but I'm an internal service and I want to get the performance boost that netTcpBindings provides.
WebHost failed to process a request. Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/30180123 Exception: System.ServiceModel.ServiceActivationException: The service '/ProfileService.svc' cannot be activated due to an exception during compilation. The exception message is: Cannot be null Parameter name: root. ---> System.ArgumentNullException: Cannot be null Parameter name: root at Ninject.Infrastructure.Ensure.ArgumentNotNull(Object argument, String name) in c:\Projects\Ninject\ninject\src\Ninject\Infrastructure\Ensure.cs:line 20 at Ninject.ResolutionExtensions.Get[T](IResolutionRoot root, IParameter[] parameters) in c:\Projects\Ninject\ninject\src\Ninject\Syntax\ResolutionExtensions.cs:line 37 at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) --- End of inner exception stack trace --- at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath) Process Name: w3wp Process ID: 8656
Is there anyone who can help with this problem? Any help on this would be greatly appreciated.
Cragly
source share