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(Object 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
maxBufferSizeandmaxReceivedMessageSizeon the binding, and attributes likemaxStringContentLengthandmaxBytesPerReadon thereaderQuotasnode of the binding.