Поделиться через


LicenseAcquirer.AcquireLicenseAsync Method (Guid)

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

Starts the license acquisition process.

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

Syntax

'Declaration
Public Sub AcquireLicenseAsync ( _
    serviceId As Guid _
)
public void AcquireLicenseAsync(
    Guid serviceId
)

Parameters

  • serviceId
    Type: System.Guid
    The service ID. This parameter is required only if you want to obtain a domain-bound license.

Exceptions

Exception Condition
InvalidOperationException

If this method is called when an existing license acquisition attempt is already in progress on that instance of the class.

InvalidOperationException

If this LicenseAcquirer was previously used for a MediaElement base license acquisition.

Remarks

This overload of AcquireLicenseAsync generates a license challenge which only works with Silverlight 5.

This overload of AcquireLicenseAsync creates an asynchronous license acquisition challenge in which no content key type or key ID set is sent in the challenge to the server. To provide the license server the requisite information to generate the needed license, it is recommended that service implementers use custom data, custom headers, or implement a custom protocol.

This overload of AcquireLicenseAsync is intended for use in scenarios where the root license does not have a traditional Key ID/Algorithm ID pair or the client does not have data about the root license ahead of time. It is expected that the license server logic would be able to determine the correct license to provide in the response based upon customer data.

The serviceId parameter is an optional parameter which may be used when acquiring a domain bound license.

Version Information

Silverlight

Supported in: 5

Platforms

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