Freigeben über


Predelivering a License By Using the GetLicenseFromURL Method

banner art

Previous Next

Predelivering a License By Using the GetLicenseFromURL Method

This scenario shows one way of predelivering a license by using the GetLicenseFromURL method. This method enables you to specify a URL from which to issue a license.

The following .asp files are included in the Predelivering a License By Using the GetLicenseFromURL Method sample:

  • Package.asp. This page enables you to specify a Windows Media file to be packaged, and then select the type of license to be issued (which scenario to test).
  • PreDel1.asp. This page predelivers a version 10 license by using GetLicenseFromURL.
  • PreLicGen.asp. This page generates a version 10 license. The rights that are given are hard-coded in this page, but you can modify the code to allow different rights.
  • Confirm1.asp. This page confirms license delivery.

To test this sample

  1. Open Package.asp, then fill out the form by specifying the Windows Media file to be packaged, the output path and file name for the packaged Windows Media file, and select Predelivery for License acquisition URL. Click Package. Copy the value for Key ID.

    Note   Make sure the output folder allows Change permission to Everyone. Otherwise, an "Access is denied" message appears when you try to package files.

  2. Edit the Global.asa file, and replace the key ID in this file with the value you copied. Save the file.

  3. Stop and restart the World Wide Web Service (at the command prompt, enter Net stop w3svc, and then enter Net start w3svc).

  4. Edit PreDel1.asp and replace your server with the URL to the server running Windows Media License Service, for example MyServer/WM/. Save the file.

  5. Open PreDel1.asp and initiate the license delivery by clicking Give me a license for the song.

  6. To test license delivery, play the packaged Windows Media file.

See Also

Previous Next

© 2007 Microsoft Corporation. All rights reserved.