locked
WCF not working after deploy RRS feed

  • Question

  • User2018960006 posted

    Hi Everyone, I have a problem at the time of deployment in my QA environment.

    When I run in my development environment, everything works perfectly fine. Strangely when I run the same code in the QA environment, I get the following error:

    Server stack trace:
       at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
       at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at MyProject.Service.ServiceContracts.IAuthentication.Authenticate(String user, String password)
       at MyProject.Web.Services.Proxies.AuthenticationProxy.Authenticate(String user, String password)
    ERROR 2012-12-26 09:53:24,013 14133ms AccountController        Login              - Object reference not set to an instance of an object.
    System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Object reference not set to an instance of an object. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
    System.NullReferenceException: Object reference not set to an instance of an object.
       at MyProject.Service.Infra.DependencyResolution.DependencyResolutionInstanceProvider.GetInstance(InstanceContext instanceContext, Message message)
       at System.ServiceModel.Dispatcher.InstanceBehavior.GetInstance(InstanceContext instanceContext, Message request)
       at System.ServiceModel.InstanceContext.GetServiceInstance(Message message)
       at System.ServiceModel.Dispatcher.InstanceBehavior.EnsureServiceInstance(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
       at System....).
    

    I've added logs to DependencyResolutionInstanceProvider.GetInstance() method in order to check if the instanceContext is null, but that doesn't seem to be the case. I've also already enabled the trace for WCF on the client and server but to no avail. The trace only shows that the net.pipe protocol is not being enabled for the ServiceManagement.svc which I haven't deployed (at least, explicitly). I have already added the net.pipe protocol to IIS service behavior but that doesn't seem to work as well.

    Any hints?

    Wednesday, December 26, 2012 7:57 AM

Answers