LicenseAcquirer.LicenseServerUriOverride Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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)

Syntax

'Declaration
Public Property LicenseServerUriOverride As Uri
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 nulla null reference (Nothing in Visual Basic), the system uses whatever license server URI is in the content header. The default value is nulla null reference (Nothing in Visual Basic).

Remarks

If the LicenseAcquirer is created on demand (from the media element) and if the LicenseServerUriOverride property is nulla null reference (Nothing in Visual Basic), 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-nulla null reference (Nothing in Visual Basic) 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 nulla null reference (Nothing in Visual Basic)) then it would succeed.

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

Examples

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);

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

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

Platforms

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