views:

165

answers:

2

hey guys,

I have a silverlight app on an MVC page that user's can draw on, when they click save an event fires in both MVC and silverlight

The MVC event redirects to a page where the drawing is reloaded so the user can confirm it was saved correctly (viewed on another silverlight app)

The silverlight application event fires off a routine that converts the existing stroke collection into simple xml, and breaks it down into 500 character chunks to be sent to the WCF service that saves the chunks to the database.

On the other side of the MVC event the silverlight app fires off a call to the WCF service to retrieve all of the chunked xml strings and brings them in and reassembles them and then rebuilds them into the stroke collection.

now for the problem. My service doesn't seem to catch all of the chunks its being sent, sometimes its only getting 1-3 of the possible 10 or more chunks, i have tested my splitting and conversion routines and guarantee that they work but what im looking for is a way to hold off on firing the MVC event so the WCF maybe can "catch up"? or is that not even the problem

as of now i am at a loss

Thanks guys.

A: 

I faced a similar problem uploading files as data chunks; check if you're using a async pattern to communicate with service (default behavior).

If yes, probably all packets are being sent, but you're rebuilding them in a different order.

Rubens Farias
theyre being rebuilt correctly... some of the packets are just missing or not being sent
Jimmy
think about two packets arriving within some milisseconds interval; you should be able to debug first packet but will miss next one.do you serialize your webservice calls?
Rubens Farias
no i don't but i have a counter parameter that is passed to the service call which orders the packets
Jimmy
A: 

I resolved this issue by removing the form from the page and leaving it entirely up to the silverlight to do the redirect after sending all of the chunks by grabbing the submit button from the DOM and attaching an event to it

Jimmy