locked
Data Exchange Silverlight, WCF RRS feed

  • Question

  • Hello 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. Please help.
    Saturday, February 27, 2010 12:38 AM

Answers

  • Hi Jayesh

    The communication between the client and the service will be made asynchornously. As you are using for loop for sending the data and because of the aync call you are trying to submit the data while the first call is still in progress. You can't make multiple submissions in the same context on the same object.

    Saturday, February 27, 2010 5:04 AM

All replies

  • Hi Jayesh

    The communication between the client and the service will be made asynchornously. As you are using for loop for sending the data and because of the aync call you are trying to submit the data while the first call is still in progress. You can't make multiple submissions in the same context on the same object.

    Saturday, February 27, 2010 5:04 AM
  • Oh! Thanks mate.
    Saturday, February 27, 2010 8:54 AM