locked
Error in WCF client RRS feed

  • Question

  • Hello, I am having an error in my WCF client. a little time after the client call the async method of the client code to communicate with the server, it throwed System.ServiceModel.FaultException. Because of that I enable IncludeExceptionDetailInFaults = true on Web.config.

    Now the error throwed is the following:

    System.ServiceModel.FaultException`1 was unhandled by user code
      Message=This property cannot be set to a null value.
      Action=http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher/fault
      StackTrace:
           em System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
           em System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
           em System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
           em System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
           em BidsLibrary.BidsServiceReference.ServiceBidsClient.ServiceBidsClientChannel.EndDocumentTypeSave(IAsyncResult result)
           em BidsLibrary.BidsServiceReference.ServiceBidsClient.BidsLibrary.BidsServiceReference.ServiceBids.EndDocumentTypeSave(IAsyncResult result)
           em BidsLibrary.BidsServiceReference.ServiceBidsClient.OnEndDocumentTypeSave(IAsyncResult result)
           em System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
      InnerException: 
    

    And I don't know where is the error.

    The error causes that the service is not called, at least the desired method, because I've put a breakpoint on service method that the WCF server make available, but it didsn't "touch" the method.

    Is someone have any suggestion?

    Monday, September 5, 2011 2:12 PM

Answers

  • Several possible reassons.

    1. One of your required parameter is null

        Sol: Debug it in the client before you make a service call

    2. Size of the data sent to the WCF Service call

       Sol: Check and increase the size in the config file (both web and in the code)

    3. Check for data type errors

    4. Check whether debug is enabled in the web project; this might be the reason for not getting the debug correctly...

    Tuesday, September 6, 2011 12:10 AM
  • Hi Devarde,

    To find some clues you can refer a sample below which provides a step by step guide to build a WCF services application.

    http://msdn.microsoft.com/en-us/gg710768

    Best Regards,

    Wednesday, September 7, 2011 3:44 AM
    Moderator

All replies

  • Several possible reassons.

    1. One of your required parameter is null

        Sol: Debug it in the client before you make a service call

    2. Size of the data sent to the WCF Service call

       Sol: Check and increase the size in the config file (both web and in the code)

    3. Check for data type errors

    4. Check whether debug is enabled in the web project; this might be the reason for not getting the debug correctly...

    Tuesday, September 6, 2011 12:10 AM
  • Hi Devarde,

    To find some clues you can refer a sample below which provides a step by step guide to build a WCF services application.

    http://msdn.microsoft.com/en-us/gg710768

    Best Regards,

    Wednesday, September 7, 2011 3:44 AM
    Moderator