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
- 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.
- Edit the Global.asa file, and replace the key ID in this file with the value you copied. Save the file.
- Stop and restart the World Wide Web Service (at the command prompt, enter Net stop w3svc, and then enter Net start w3svc).
- 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.
- Open PreDel1.asp and initiate the license delivery by clicking Give me a license for the song.
- To test license delivery, play the packaged Windows Media file.
- Complex License Generation
- Packaging a Batch of Windows Media Files
- Packaging a Batch of Windows Media Files and Specifying the Rights
- Predelivering a License By Using the GetSystemInfo Method
- Setting Up the Global.asa File
- Simple License Generation
- Using the Sample Pages
© 2007 Microsoft Corporation. All rights reserved.