Asynchronous web-service calls from Silverlight

Following on from not being able to make webservice calls on non-UI thread, asynchronous calls can be made via the BeginXXX/EndXXX methods in the generated proxy as long as they are initiated on the UI thread.

The check is done in the BrowserHttpWebRequest constructor so a bit of Lutz-ing on System.Silverlight.dll reveals that the constructor is called before the method is asynchronously invoked and hence works as long as the BeginXXX method is called on the UI thread.

Based on all this and a bit of refactoring, my progress animation now plays whilst I make a number of paged web-service calls to gradually populate the navigation controls.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s