locked
WCF service not returning a list object RRS feed

  • Question

  • hello Folkes,

    This is my very first question to the forum...

    Well, i have a object of List<> type which contains some values.
    when i am trying to send that object to the client using WCF service it gets lost somewhere and the error is generated stating "The sequence has been terminated by the remote endpoint. The reliable session was faulted."...

    but when i try to extract value from the object and try sending one one value it goes succesfully to the client...

    i dont understand y the entire object cannot go when one value when extracted from the object can go..


    code that i have written
    -------------------------

    EdiCustMappingService ser = new EdiCustMappingService();
    List<EdiFormat> lstEDICust = ser.GetAll().ToList<EdiFormat>();
    return lstEDICust


    ----------code end------------

    client code to accept the value of lstEDICust
    ---------------------------------------------
     List<EdiFormat> custMapping;
    custMapping = proxy.GetAllCustMapping();


    there is the error at this point when it comes to custMapping.


    please help... i am badly stuck

    Wednesday, January 6, 2010 11:05 AM

Answers

  • Hi,

    Is it a large list?... In order to prevent denial-of-service attacks, WCF imposes some restrictions on the message and buffer sizes so when you're sending/receiving a large amount of data you should tweak some configuration values in your binding to increase the limit.

    In order to do that... you should configure the maxReceivedMessageSize, maxBufferSize and maxBufferPoolSize values of the binding: http://msdn.microsoft.com/en-us/library/system.servicemodel.basichttpbinding.maxreceivedmessagesize.aspx

    Hope it helps.
    Regards,
    Rodrigo.
    • Proposed as answer by Frank Xu Lei Wednesday, January 6, 2010 12:39 PM
    • Marked as answer by Riquel_Dong Monday, January 11, 2010 3:20 AM
    Wednesday, January 6, 2010 11:59 AM

All replies

  • Hi,

    Is it a large list?... In order to prevent denial-of-service attacks, WCF imposes some restrictions on the message and buffer sizes so when you're sending/receiving a large amount of data you should tweak some configuration values in your binding to increase the limit.

    In order to do that... you should configure the maxReceivedMessageSize, maxBufferSize and maxBufferPoolSize values of the binding: http://msdn.microsoft.com/en-us/library/system.servicemodel.basichttpbinding.maxreceivedmessagesize.aspx

    Hope it helps.
    Regards,
    Rodrigo.
    • Proposed as answer by Frank Xu Lei Wednesday, January 6, 2010 12:39 PM
    • Marked as answer by Riquel_Dong Monday, January 11, 2010 3:20 AM
    Wednesday, January 6, 2010 11:59 AM
  • Hi,
       is EdiFormat a datacontract or can be serializable?
    Frank Xu Lei--谦卑若愚,好学若饥
    专注于.NET平台下分布式应用系统开发和企业应用系统集成
    Focus on Distributed Applications Development and EAI based on .NET
    欢迎访问老徐的中文技术博客:Welcome to My Chinese Technical Blog
    欢迎访问微软WCF中文技术论坛:Welcome to Microsoft Chinese WCF Forum
    欢迎访问微软WCF英文技术论坛:Welcome to Microsoft English WCF Forum
    Wednesday, January 6, 2010 12:40 PM
  • Hello frends,

    Thanks ... found a solution to the above problem....well while generating the net tiers layers ..u should select true to WCF attributes...so it returns the WCF list objects .
    Tuesday, January 12, 2010 2:53 PM