Printer Friendly Version      Send     
Click to Rate and Give Feedback
MSDN
MSDN Library
Live Services SDK
 Silverlight Streaming API Sample
Windows Live
Silverlight Streaming API Sample

The Silverlight Streaming API sample demonstrates how to use the API to perform HTTP operations against the Silverlight Streaming hosting server. The Silverlight Streaming API is based on the WebDAV standard protocol.

This sample involves the following tasks:

  • Creating the WebDAV_clientdemo_CS solution in Visual Studio.

Prerequisites

  1. Extract the files in WebDAV_clientdemo_CS.zip to a folder on your computer.

  2. Launch Visual Studio.

  3. From the File menu, select New, then Project.

  4. In the Project Types pane, expand the Visual C# node and select Windows.

  5. In the Templates pane, select Windows Forms Application.

  6. Name the project WebDAV_clientdemo_CS and click OK.

  7. In Solution Explorer, right-click Form1.cs and Program.cs and click Delete.

  8. Right-click the WebDAV_clientdemo_CS node in Solution Explorer, select Add, then click Existing Item.

  9. Navigate to the folder where you extracted the ZIP file.

  10. In the Add Existing Item dialog, select All Files (*.*) from the Objects of Type dropdown list.

  11. In the Add Existing Item dialog, select the following files, then click Add:

    • AccountCredentials.cs
    • AccountCredentials.designer.cs
    • AccountCredentials.resx
    • AccountInfo.cs
    • MyCredentials.xml
    • Program.cs
    • WebDAVClient.cs
    • WebDAVClient.designer.cs
    • WebDAVClient.resx
  12. From the Build menu, choose Build Solution.

  13. Press F5 to run the application.

  1. When prompted, enter your Silverlight Streaming account ID and account key. You can retrieve these values from the Silverlight Streaming administration site.

  2. Use the GET operation to retrieve file and file set data from the Silverlight Streaming administration site:

    1. Leave the application name field blank to return data for all applications.
    2. Specify an application name to return a list of files comprising that application.
    3. Specify the name of a text file within the application package to return the contents of that file.
    4. Check the box Return all results after the specified application name to return only applications whose name follows alphabetically the specified application name.
    5. Specify a value for Max items to return to limit the number of results.
  3. Use the POST operation to upload an application package to the Silverlight Streaming administration site, create a new application with the specified name, and extract the files from the application package. Specify the path to the ZIP file on your local computer and a name for the application on the Silverlight Streaming server.

  4. Use the PUT operation to place a single file on the Silverlight Streaming server. Note that you can upload an application package using PUT, but the files will not be automatically extracted from the package.

  5. Use the DELETE operation to delete an application from the Silverlight Streaming server.

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker