Printer Friendly Version      Send     
Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Windows Live
 Accounts and Authentication
Windows Live
Accounts and Authentication

To develop a solution using the Silverlight Streaming API, you will need to know the following information about your account (available from the Silverlight Streaming administration Web site).

  • Account ID — The global name of your Silverlight Streaming account. Although the account ID is a numeric value, it should be treated as a string in your code.
  • Account Key — A string of characters used to authenticate service requests. The account key is case sensitive.

The Silverlight Streaming API uses standard Hyper Text Transfer Protocol (HTTP) basic authentication (RFC 2617). Your user name is your Silverlight Streaming account ID (not your Windows Live ID) and the password is your Silverlight Streaming account key. The account details can be obtained on the Manage Account page on the Silverlight Streaming administration Web site. All requests must be over SSL (https).

The following C# console application demonstrates the calls required for authentication.

C#

using System;
using System.Net;
using System.IO; 

namespace SilverlightServicesApi
{
 class Program
 {
  static void Main(string[] args)
  {
   // accountId = Silverlight Streaming Account ID
   HttpWebRequest req =
     (HttpWebRequest)HttpWebRequest.Create
     ("https://silverlight.services.live.com/accountId");
   byte[] userPass = Encoding.Default.GetBytes(accountId + ":" + accountsecret);
   string basic = "Basic " + Convert.ToBase64String(userPass);
   req.Headers["Authorization"] = basic; 

   HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
   Stream strm = resp.GetResponseStream();
   StreamReader rdr = new StreamReader(strm);
   string xmlResponse = rdr.ReadToEnd();
  }
 }
}

Before you upload an application to Silverlight Streaming, you must package your application files into file sets. Each file set represents one Silverlight application. For example, a video file set might include the Windows Media file with the video, several small JPG files showing stills from index points within the video, and a copy of the player application to display the video.

All files in a file set must be contained in a single ZIP archive.

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