Share via


Setting License Priority

banner art

Previous Next

Setting License Priority

When the user tries to use protected content, the player evaluates the licenses in the license store, looking for a license with the right to perform the requested action. The player uses the first license that allows the action. Each license has a priority that dictates the order in which licenses are evaluated. Licenses with a higher priority are evaluated first, and so, they are used first.

  • The license priority is set using the WMRMLicGen.Priority property.
  • The default priority value is 0.
  • The maximum priority value is 2147483647.

When setting the priority, consider what is a better experience for the user and which license you want to be used first. For example, a user has two licenses for the same song: one license that expires in 7 days and one license that allows 10 plays. It is better for the consumer to use the time-based licenses first, and then, when it expires, to use the 10 plays. Otherwise, if the count-based license were used first, the other license might expire before the consumer could use it.

When setting the priority for licenses that will be used on devices, users have a better experience when they do not have to synchronize licenses frequently. If you issue licenses that have different expiration dates, the one with the highest priority is used on the device, so licenses that expire later should have a higher priority. One way to implement this is by setting a priority that directly corresponds to the date. Another way is by incrementing the priority each day—it will take 5.8 million years to reach the maximum priority value.

The following are general guidelines for setting license priority:

  • Purchased content should be given the highest priority.
  • For time-based licenses, licenses that expire later should be higher priority than licenses that expire sooner.
  • Count-based licenses should have the lowest priority.

See Also

Previous Next

© 2007 Microsoft Corporation. All rights reserved.