Autofac WCF Integration

1k views Asked by At

I was trying to use the autofac with WCF Integration. I was using the solution from https://code.msdn.microsoft.com/DI-with-WCF-using-Autofac-a3e8cbbb. I am able to consume the service and call the operations by adding a service reference.But when I am trying to use WCF Test client or SOAP UI its not giving the response.In WCF test client it was giving the exception -

System.InvalidOperationException: The service type provided could not be loaded as a service because it does not have a default (parameter-less) constructor. To fix the problem, add a default constructor to the type, or pass an instance of the type to the host.

I tried adding the paramterless constructor for the service but after that it was giving another exception while invoking the service -

The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs. Server stack trace: at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)

0

There are 0 answers