Search code examples
c#silverlightsilverlight-5.0playready

System.Exception 6028 thrown from MediaElement in Silverlight


After upgrade from Silverlight 4 to Silverlight 5 I get System.Exception 6028 when MediaElement in my own player tries to play DRM h264 video. It happens when I already have license stored on my computer.

This happens on Silverlight 5.0.61118.0.

I would appreciate any help on identifying cause of that exception, and finding solution other than deleting licenses and acquiring them again.

EDIT: I deleted all PlayReady licenses on my PC, but after some time I did get that system exception again. One good thing about it is I could copy this exception message:

System.Exception: 6028 No valid simple or leaf license is available to create the decryptor

I did checked one more thing. DRM server which my app is asking for licence is 1.5.2 version.


Solution

  • Check http://blogs.msdn.com/b/playready4/archive/2011/12/08/playready-license-acquisition-fails-after-upgrading-to-silverlight-5.aspx

    To fix this issue (in the case of expired persistent license), we need to use MediaFailed event handler. In the handler, if the error code is 6028, we just need to use LicenseAcquirer to acquire license. The LicenseAcquirer could be a custom LicenseAcquirer or the default LicenseAcquirer of SSME.