Data Exchange WCF and Silverlight
I am using a WCF service and a Silverlight Client sending data to the service.
I am sending data to the service in a For-Loop.
However, when the loop runs for the first time the data is being perfectly run, while in the next turn it is returning this error:
Microsoft JScript runtime error: Unhandled Error in Silverlight Application An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at WcfConsumption.SimpleSVC.SetXMLCompletedEventArgs.get_Result() at WcfConsumption.MainPage.proxy_SetXMLCompleted(Obj开发者_如何学Goect sender, SetXMLCompletedEventArgs e) at WcfConsumption.SimpleSVC.SimpleWCFClient.OnSetXMLCompleted(Object state)
In the service, I am storing the received file in a XML file.
To answer your follow up comment - check the values you have got set in your binding configuration on the server side. Pay attention to attributes like maxBufferSize
and maxReceivedMessageSize
on the binding, and attributes like maxStringContentLength
and maxBytesPerRead
on the readerQuotas
node of the binding.
I would take a look at http://smehrozalam.wordpress.com/2009/01/29/retrieving-huge-amount-of-data-from-wcf-service-in-silverlight-application/.
精彩评论