Generating a License for Metered Content

Generating a License for Metered Content

banner art

Generating a License for Metered Content

After receiving a metering certificate from a metering aggregation service, a license issuer generates a license for metered content as follows:

  • When a license request is received for metered content, the license issuer uses the WMRMLicGen.MeteringCertificate property to specify which metering certificate to use.
  • The corresponding metering ID and URL are then added to the license, and all actions for the corresponding content will be metered.

Example Code

' Declare variables. 
Dim LicenseObj               ' WMRMLicGen object
Dim MeterCert                ' Metering certificate
Dim LicenseKID               ' Key ID
Dim LicenseKey               ' Key
Dim RightsString             ' Rights string
Dim varClientInfo            ' Client information
Dim ContentServerPubKey      ' Public key of the content server
Dim IndiVersion              ' Security version of the DRM component
Dim varLicense               ' License

' Specify your metering certificate (XML string). 
' The following is a sample metering certificate.
' VBScript requires you to use double quotes for quotes within the string.

' Generate the license.
Set LicenseObj = Server.CreateObject("WMRMObjs.WMRMlicgen")
LicenseObj.KeyID = LicenseKID
LicenseObj.SetKey "", LicenseKey
LicenseObj.Priority = 10
LicenseObj.Rights = RightsString
LicenseObj.ClientInfo = varClientInfo
LicenseObj.BindToPubKey = ContentServerPubKey
LicenseObj.MeteringCertificate = MeterCert
LicenseObj.IndividualizedVersion = IndiVersion
varLicense = LicenseObj.GetLicenseToDeliver()

See Also


© 2007 Microsoft Corporation. All rights reserved.

© 2015 Microsoft