LicenseAcquirer.LicenseServerUriOverride Property


Gets or sets a Uniform Resource Identifier (URI) value that overrides whatever the license server URI is in the content header.

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)

public Uri LicenseServerUriOverride { get; set; }

Property Value

Type: System.Uri
The URI that overrides the URI that is provided in the content header (if any). If this property is null, the system uses whatever license server URI is in the content header. The default value is null.

If the LicenseAcquirer is created on demand (from the media element) and if the LicenseServerUriOverride property is null, the system uses whatever license server URI is in the content. For Windows Media DRM content and PlayReady content where the header does not have a license server URI, the AcquiringLicense step fails (see Digital Rights Management (DRM) for more information about how DRM with Silverlight works). In this case, you need to provide a URI to the correct Licensing Server using this property.

The URI only needs to be non-null at the time of callback into the base OnAcquireLicense method. Therefore, if you overloaded OnAcquireLicense and you call the base implementation passing in a URI (but the URI set to the LicenseAcquirer instance is still null) then it would succeed.

If set, the value of this property is passed as the licenseServerUri parameter of the OnAcquireLicense method.

The following code shows how to override the URI of the PlayReady License Server that is used by a MediaElement.

myMediaElement.LicenseAcquirer.LicenseServerUriOverride = new Uri("http://myLicenseServer.asmx", UriKind.Absolute);


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.