none
The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.

    Question

  • Hello,

    I have a Silverlight-enabled WCF service that has an operation that executes a query against my database. When I execute this operation, I receive an error that says "The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error." I know it has something to do with trying to return too many objects. But I'm not sure how to fix it.

    My operation executes a stored procedure that returns ~15,000 records. This stored procedure executes fast enough (SQL Server Management Studio says it runs in 1 second). I have confirmed that the records are being pass up to my operation correctly. Then when it goes to return them to the Silverlight application, I receive the error listed above. I have confirmed that the operation works by only returning 100 records.

    My question is, how do I return larger data sets across Silverlight? 

    Thank you

     

    Wednesday, February 24, 2010 2:26 PM

Answers

  •   If you are sure the error only happens when you trying to return large volume of data, add this to your Web.Config file:

    <behavior name="YourService.Service1Behavior">

    <serviceMetadata httpGetEnabled="true" />

    <serviceDebug includeExceptionDetailInFaults="false" />

    <dataContractSerializer maxItemsInObjectGraph="6553600"/>    // Add this line

    </behavior>


    Wednesday, February 24, 2010 3:33 PM

All replies

  •   If you are sure the error only happens when you trying to return large volume of data, add this to your Web.Config file:

    <behavior name="YourService.Service1Behavior">

    <serviceMetadata httpGetEnabled="true" />

    <serviceDebug includeExceptionDetailInFaults="false" />

    <dataContractSerializer maxItemsInObjectGraph="6553600"/>    // Add this line

    </behavior>


    Wednesday, February 24, 2010 3:33 PM
  • I should never pass ~15 000 record over the wire at the first place (can affect performance badly).. The user will probably never go through all the records.. so in your case I should use paging (only get the data showed on each page instead of all records) or filtering, and only pass few numbers of records..

    Wednesday, February 24, 2010 3:46 PM
  • @sladapter: Thank you very much. I found solution of my problem.

    Saturday, November 26, 2011 7:20 AM