none
There was an error reading from the pipe: The pipe has been ended. (109, 0x6d).

    Question

  • //Hi,

    //I am trying to return a list of custom entities (data contract item) to client.
    //both has the same contract interface and data contract referenced but still this exception pops up. why??
    //Could it possibly be the Enum that has been added to the datacontract class?




    [DataContract(Name="ResultType")] public enum ResultType { [EnumMember] Upload = 1, [EnumMember] Output = 2, [EnumMember] Reversal = 3, [EnumMember] Success = 4, [EnumMember] Cancellation = 5, [EnumMember] Recall = 6 } [DataContract] [KnownType(typeof(ResultType))] public class SubmissionResult { [DataMember] public int SubmitResultHeaderCode { get; set; } [DataMember] public string InternalReference { get; set; } [DataMember] public DateTime OriginalSubmitDate { get; set; } [DataMember] public string ResultCode { get; set; } [DataMember] public DateTime ResultDate { get; set; } [DataMember] public decimal ResultAmount { get; set; } [DataMember] public int Status { get; set; } [DataMember] public Guid ExtGUID { get; set; } [DataMember] public int ProcessStatus { get; set; } [DataMember] public ResultType ResultType { get; set; } [DataMember] public string FileLine { get; set; } [DataMember] public int MatchingLevel { get; set; } [DataMember] public int ErrHandled { get; set; } [DataMember] public decimal ResultFee { get; set; } [DataMember] public int SubmitResultCode { get; set; } [DataMember] public int SubmitDetailCode { get; set; } }




    Test method ManagerTests.ResultsManagerImplTest.ImportFile threw exception:  System.ApplicationException: Could not import test file. --->  System.ApplicationException: Could not get actual submission results. --->  System.ApplicationException: Could not complete function GetSubmissionResults. --->  System.ServiceModel.CommunicationException: There was an error reading from the pipe: The pipe has been ended. (109, 0x6d). --->  System.IO.IOException: The read operation failed, see inner exception. --->  System.ServiceModel.CommunicationException: There was an error reading from the pipe: The pipe has been ended. (109, 0x6d). --->  System.IO.PipeException: There was an error reading from the pipe: The pipe has been ended. (109, 0x6d)..
    I.W Coetzer
    Thursday, November 05, 2009 8:08 AM

Answers

  • Resolved,

    When I was setting and populating a list containing entities based on this data contract i did not specify a default value for the data member ResultType which is of enum type ResultType. this could not be serialized since I do not have a "0" based enum member!

    So I added one and now it works!
    See NotSet = 0 !!!!!

    Alternatively one could create a constructor on the DataContract class to set the ResultType to another setting by default like ResultType = ResultType.Upload; ...

    public enum ResultType
    {
    	[EnumMember]
    	NotSet = 0,
    	[EnumMember]
    	Upload = 1,
    	[EnumMember]
    	Output = 2,
    	[EnumMember]
    	Reversal = 3,
    	[EnumMember]
    	Success = 4,
    	[EnumMember]
    	Cancellation = 5,
    	[EnumMember]
    	Recall = 6
    }


    I.W Coetzer
    • Marked as answer by I.W Coetzer Thursday, November 05, 2009 8:57 AM
    Thursday, November 05, 2009 8:57 AM