O'Reilly logo

Microsoft Silverlight 5 Data and Services Cookbook by Kevin Dockx, Gill Cleeren

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with the ClientHttp stack

Applies to Silverlight 3, 4 and 5

When communicating with a REST service, Silverlight uses the BrowserHttpStack by default. Due to this, Silverlight can't use all the HTTP verbs, such as PUT and DELETE. Silverlight 3 added a new option, namely the ClientHttp stack. This new stack bypasses the browser stack, and performs its communication directly through the operating system.

In this recipe, we'll look at the changes that we need to make to use this networking stack.

Getting ready

To follow along with this recipe, you can use the code created in the previous recipe. Alternatively, you can use the starter solution located in the Chapter10/TalkingToSimpleRESTServices_ClientHttp_Starter folder in the code bundle available ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required