RightsManagementFailureCode RightsManagementFailureCode RightsManagementFailureCode RightsManagementFailureCode Enum


Specifies error conditions that can occur when performing a rights management operation.

public enum class RightsManagementFailureCode
public enum RightsManagementFailureCode
type RightsManagementFailureCode = 
Public Enum RightsManagementFailureCode


Aborted Aborted Aborted Aborted -2147168447

Asynchronous operation canceled, or a non-recoverable error has occurred.

ActivationFailed ActivationFailed ActivationFailed ActivationFailed -2147168448

License activation failed; rights management services are not properly configured.

AdEntryNotFound AdEntryNotFound AdEntryNotFound AdEntryNotFound -2147168419

The current user was not found in the Active Directory (AD) for certification under Windows authentication.

AlreadyInProgress AlreadyInProgress AlreadyInProgress AlreadyInProgress -2147168456

The requested operation is already in progress.

AuthenticationFailed AuthenticationFailed AuthenticationFailed AuthenticationFailed -2147168445

Possible authentication error (HTTP error 401) returned by an Internet request. Or, the current user does not have valid domain credentials in a silent user activation attempt. Or, the certification server in silent user activation is not in the local intranet or trusted sites zone.

BadGetInfoQuery BadGetInfoQuery BadGetInfoQuery BadGetInfoQuery -2147168494

An invalid constant was passed.

BindAccessPrincipalNotEnabling BindAccessPrincipalNotEnabling BindAccessPrincipalNotEnabling BindAccessPrincipalNotEnabling -2147168478

The access condition is not matched to the enabling principal that is handed into the bind.

BindAccessUnsatisfied BindAccessUnsatisfied BindAccessUnsatisfied BindAccessUnsatisfied -2147168477

The current user does not satisfy the conditions defined in the End Use License (EUL).

BindContentNotInEndUseLicense BindContentNotInEndUseLicense BindContentNotInEndUseLicense BindContentNotInEndUseLicense -2147168479

The specified resource is not contained in any WORK node of the license.

BindIndicatedPrincipalMissing BindIndicatedPrincipalMissing BindIndicatedPrincipalMissing BindIndicatedPrincipalMissing -2147168476

The enabling principal does not match the issued principal of the End Use License (EUL).

BindIntervalTimeViolated BindIntervalTimeViolated BindIntervalTimeViolated BindIntervalTimeViolated -2147168465

The defined time period for the protected content has expired; access is no longer permitted.

BindMachineNotFoundInGroupIdentity BindMachineNotFoundInGroupIdentity BindMachineNotFoundInGroupIdentity BindMachineNotFoundInGroupIdentity -2147168475

The current machine is not defined within the rights managed group identity.

BindNoApplicableRevocationList BindNoApplicableRevocationList BindNoApplicableRevocationList BindNoApplicableRevocationList -2147168472

The current user does not have rights to access the protected content.

BindNoSatisfiedRightsGroup BindNoSatisfiedRightsGroup BindNoSatisfiedRightsGroup BindNoSatisfiedRightsGroup -2147168464

The specified rights group is not contained in the End Use License (EUL).

BindPolicyViolation BindPolicyViolation BindPolicyViolation BindPolicyViolation -2147168485

The current user does not have rights to access the protected content.

BindRevocationListStale BindRevocationListStale BindRevocationListStale BindRevocationListStale -2147168473

The license requires that a new revocation list must be acquired.

BindRevokedIssuer BindRevokedIssuer BindRevokedIssuer BindRevokedIssuer -2147168483

The current user does not have rights to access the protected content.

BindRevokedLicense BindRevokedLicense BindRevokedLicense BindRevokedLicense -2147168484

The current user does not have rights to access the protected content.

BindRevokedModule BindRevokedModule BindRevokedModule BindRevokedModule -2147168480

Rights management services are not properly configured.

BindRevokedPrincipal BindRevokedPrincipal BindRevokedPrincipal BindRevokedPrincipal -2147168482

The current user does not have rights to access the protected content.

BindRevokedResource BindRevokedResource BindRevokedResource BindRevokedResource -2147168481

The current user does not have rights to access the protected content.

BindSpecifiedWorkMissing BindSpecifiedWorkMissing BindSpecifiedWorkMissing BindSpecifiedWorkMissing -2147168463

The End Use License (EUL) contains no WORK node.

BindValidityTimeViolated BindValidityTimeViolated BindValidityTimeViolated BindValidityTimeViolated -2147168488

The defined time period for the protected content has expired; access is no longer permitted.

BrokenCertChain BrokenCertChain BrokenCertChain BrokenCertChain -2147168487

The rights management certificate chain is broken.

ClockRollbackDetected ClockRollbackDetected ClockRollbackDetected ClockRollbackDetected -2147168491

Clock rollback has been detected. Protected content cannot be accessed.

CryptoOperationUnsupported CryptoOperationUnsupported CryptoOperationUnsupported CryptoOperationUnsupported -2147168492

A cryptographic operation that was requested is not supported. For example, passing an RMS encrypting object for decrypting purposes.

DebuggerDetected DebuggerDetected DebuggerDetected DebuggerDetected -2147168416

Cannot open or publish content with restricted permissions because a debugger has been detected.

EmailNotVerified EmailNotVerified EmailNotVerified EmailNotVerified -2147168422

The user's email address cannot be verified.

EnablingPrincipalFailure EnablingPrincipalFailure EnablingPrincipalFailure EnablingPrincipalFailure -2147168496

The specified principal cannot be enabled.

EncryptionNotPermitted EncryptionNotPermitted EncryptionNotPermitted EncryptionNotPermitted -2147168508

Encryption is not permitted.

EnvironmentCannotLoad EnvironmentCannotLoad EnvironmentCannotLoad EnvironmentCannotLoad -2147168501

The SecureEnvironment cannot load.

EnvironmentNotLoaded EnvironmentNotLoaded EnvironmentNotLoaded EnvironmentNotLoaded -2147168502

The SecureEnvironment cannot load.

ExpiredOfficialIssuanceLicenseTemplate ExpiredOfficialIssuanceLicenseTemplate ExpiredOfficialIssuanceLicenseTemplate ExpiredOfficialIssuanceLicenseTemplate -2147168425

The authorized time period defined in the issuance license template has expired; access is no longer permitted.

GlobalOptionAlreadySet GlobalOptionAlreadySet GlobalOptionAlreadySet GlobalOptionAlreadySet -2147168396

The option specified has already been set.

GroupIdentityNotSet GroupIdentityNotSet GroupIdentityNotSet GroupIdentityNotSet -2147168455

A user name was not specified for the client session.

HidCorrupted HidCorrupted HidCorrupted HidCorrupted -2147168442

The Hardware ID (HID) used in a machine activation attempt is incorrectly formatted. Rights management services are not properly configured.

HidInvalid HidInvalid HidInvalid HidInvalid -2147168423

The Hardware ID (HID) used in a machine activation attempt is invalid. Rights management services are not properly configured.

IdMismatch IdMismatch IdMismatch IdMismatch -2147168459

The content ID from the license does not match the content ID the license storage session.

IncompatibleObjects IncompatibleObjects IncompatibleObjects IncompatibleObjects -2147168498

An object type passed is incompatible with this operation.

InfoNotInLicense InfoNotInLicense InfoNotInLicense InfoNotInLicense -2147168511

When creating a bound license, an issuance license, not an end-use license, was specified.

InfoNotPresent InfoNotPresent InfoNotPresent InfoNotPresent -2147168495

Some information is missing.

InstallationFailed InstallationFailed InstallationFailed InstallationFailed -2147168443

An installation operation failed.

InvalidAlgorithmType InvalidAlgorithmType InvalidAlgorithmType InvalidAlgorithmType -2147168503

The algorithm type specified is invalid.

InvalidClientLicensorCertificate InvalidClientLicensorCertificate InvalidClientLicensorCertificate InvalidClientLicensorCertificate -2147168424

Rights management services are not properly configured.

InvalidEmail InvalidEmail InvalidEmail InvalidEmail -2147168437

RMS Server email address verification failed.

InvalidEncodingType InvalidEncodingType InvalidEncodingType InvalidEncodingType -2147168505

The specified encoding type is invalid.

InvalidHandle InvalidHandle InvalidHandle InvalidHandle -2147168468

Either the environment or the enabling principal handle is invalid.

InvalidIssuanceLicenseTemplate InvalidIssuanceLicenseTemplate InvalidIssuanceLicenseTemplate InvalidIssuanceLicenseTemplate -2147168428

The Rights Management Services template contains one or more errors.

InvalidKeyLength InvalidKeyLength InvalidKeyLength InvalidKeyLength -2147168427

The key length specified in a key/value pair is invalid.

InvalidLicense InvalidLicense InvalidLicense InvalidLicense -2147168512

The license structure in one of the certificates is invalid.

InvalidLicenseSignature InvalidLicenseSignature InvalidLicenseSignature InvalidLicenseSignature -2147168510

Rights management signed digital certificate cannot be validated. (The signed certificate may have been tampered.)

InvalidLockboxPath InvalidLockboxPath InvalidLockboxPath InvalidLockboxPath -2147168399

Rights management services are not properly configured.

InvalidLockboxType InvalidLockboxType InvalidLockboxType InvalidLockboxType -2147168400

Rights management services are not properly configured.

InvalidNumericalValue InvalidNumericalValue InvalidNumericalValue InvalidNumericalValue -2147168504

The numeric value specified is invalid.

InvalidRegistryPath InvalidRegistryPath InvalidRegistryPath InvalidRegistryPath -2147168398

The specified registry path is invalid.

InvalidServerResponse InvalidServerResponse InvalidServerResponse InvalidServerResponse -2147168441

Rights management services are not properly configured.

InvalidTimeInfo InvalidTimeInfo InvalidTimeInfo InvalidTimeInfo -2147168431

The time information specified is invalid.

InvalidVersion InvalidVersion InvalidVersion InvalidVersion -2147168506

The rights management version is incorrect.

KeyTypeUnsupported KeyTypeUnsupported KeyTypeUnsupported KeyTypeUnsupported -2147168493

The key type specified in a key/value pair is not supported.

LibraryFail LibraryFail LibraryFail LibraryFail -2147168497

A library operation failed.

LibraryUnsupportedPlugIn LibraryUnsupportedPlugIn LibraryUnsupportedPlugIn LibraryUnsupportedPlugIn -2147168474

The specified library plug-in is not supported.

LicenseAcquisitionFailed LicenseAcquisitionFailed LicenseAcquisitionFailed LicenseAcquisitionFailed -2147168460

An End Use License (EUL) could not be acquired from the rights management server.

LicenseBindingToWindowsIdentityFailed LicenseBindingToWindowsIdentityFailed LicenseBindingToWindowsIdentityFailed LicenseBindingToWindowsIdentityFailed -2147168429

The current user credentials are not valid for acquiring a license.

ManifestPolicyViolation ManifestPolicyViolation ManifestPolicyViolation ManifestPolicyViolation -2147183860

An operation is in violation of the rights management manifest policy.

MetadataNotSet MetadataNotSet MetadataNotSet MetadataNotSet -2147168433

The specified metadata could net be set.

NeedsGroupIdentityActivation NeedsGroupIdentityActivation NeedsGroupIdentityActivation NeedsGroupIdentityActivation -2147168450

The user is not activated, or no Rights Account Certificate (RAC) was submitted and none was found in the license store to match the license associated with this session.

NeedsMachineActivation NeedsMachineActivation NeedsMachineActivation NeedsMachineActivation -2147168451

The computer must be activated before the user can be activated.

NoAesCryptoProvider NoAesCryptoProvider NoAesCryptoProvider NoAesCryptoProvider -2147168397

Rights management services are not properly configured.

NoConnect NoConnect NoConnect NoConnect -2147168453

Rights management cannot connect to the URI specified for the license server.

NoDistributionPointUrlFound NoDistributionPointUrlFound NoDistributionPointUrlFound NoDistributionPointUrlFound -2147168457

The protected content is corrupted.

NoLicense NoLicense NoLicense NoLicense -2147168452

A required license is not available.

NoMoreData NoMoreData NoMoreData NoMoreData -2147168461

No license or certificate exists at the specified index.

NotAChain NotAChain NotAChain NotAChain -2147168418

Rights managed content is corrupted.

NotSet NotSet NotSet NotSet -2147168434

The item requested to delete does not exist.

OutdatedModule OutdatedModule OutdatedModule OutdatedModule -2147168435

Rights management services are not properly configured.

OutOfQuota OutOfQuota OutOfQuota OutOfQuota -2147168446

The license server's maximum quota of End Use Licenses (EULs) has been reached.

OwnerLicenseNotFound OwnerLicenseNotFound OwnerLicenseNotFound OwnerLicenseNotFound -2147168395

The document does not contain an Owner License.

QueryReportsNoResults QueryReportsNoResults QueryReportsNoResults QueryReportsNoResults -2147168490

No instances of the requested attribute exist.

RecordNotFound RecordNotFound RecordNotFound RecordNotFound -2147168454

The specified license was not found.

RequestDenied RequestDenied RequestDenied RequestDenied -2147168417

The Rights Management server does not allow temporary certification of the current user.

RevocationInfoNotSet RevocationInfoNotSet RevocationInfoNotSet RevocationInfoNotSet -2147168432

Certificate or license revocation information has not been set.

RightNotGranted RightNotGranted RightNotGranted RightNotGranted -2147168507

The current user does not have rights to access the protected content.

RightNotSet RightNotSet RightNotSet RightNotSet -2147168430

The requested right was not specified when the content was published with rights management.

ServerError ServerError ServerError ServerError -2147168444

Rights management services are not properly configured.

ServerNotFound ServerNotFound ServerNotFound ServerNotFound -2147168438

Rights management services are not properly configured.

ServiceGone ServiceGone ServiceGone ServiceGone -2147168420

Rights management services are not properly configured.

ServiceMoved ServiceMoved ServiceMoved ServiceMoved -2147168421

Rights management services are not properly configured.

ServiceNotFound ServiceNotFound ServiceNotFound ServiceNotFound -2147168440

Rights management services are not properly configured.

Success Success Success Success 0

Operation has competed successfully.

TooManyCertificates TooManyCertificates TooManyCertificates TooManyCertificates -2147168458

The number of certificates has exceeded the maximum number allowed.

TooManyLoadedEnvironments TooManyLoadedEnvironments TooManyLoadedEnvironments TooManyLoadedEnvironments -2147168500

Too many SecureEnvironment instance have been created.

UnexpectedException UnexpectedException UnexpectedException UnexpectedException -2147168489

An unspecified error occurred. Also thrown when an application runs in debug mode.

UseDefault UseDefault UseDefault UseDefault -2147168439

If a request is made for computer activation or a rights account certificate, receiving UseDefault indicates that the application should pass null into the ActServInfo parameter.

ValidityTimeViolation ValidityTimeViolation ValidityTimeViolation ValidityTimeViolation -2147168436

The defined time period for the protected content has expired; access is no longer permitted.


The following example shows use of the FailureCode and Message properties to create an error message for the user.

WriteStatus("   Building secure environment.");
    string applicationManifest = "<manifest></manifest>";
    if (File.Exists("rpc.xml"))
        StreamReader manifestReader = File.OpenText("rpc.xml");
        applicationManifest = manifestReader.ReadToEnd();

    if (_secureEnv == null)
        if (SecureEnvironment.IsUserActivated(new ContentUser(
                    _currentUserId, AuthenticationType.Windows)))
            _secureEnv = SecureEnvironment.Create(
                applicationManifest, new ContentUser(
                    _currentUserId, AuthenticationType.Windows));
            _secureEnv = SecureEnvironment.Create(
catch (RightsManagementException ex)
    MessageBox.Show("ERROR: Failed to build secure environment.\n" +
        "Exception: " + ex.Message + "\n\n" +
        ex.FailureCode.ToString() + "\n\n" + ex.StackTrace,
        "Rights Management Exception",
        MessageBoxButton.OK, MessageBoxImage.Error);
    return false;
WriteStatus("   Building secure environment.")
    Dim applicationManifest As String = "<manifest></manifest>"
    If File.Exists("rpc.xml") Then
        Dim manifestReader As StreamReader = File.OpenText("rpc.xml")
        applicationManifest = manifestReader.ReadToEnd()
    End If

    If _secureEnv Is Nothing Then
        If SecureEnvironment.IsUserActivated(New ContentUser(_currentUserId, AuthenticationType.Windows)) Then
            _secureEnv = SecureEnvironment.Create(applicationManifest, New ContentUser(_currentUserId, AuthenticationType.Windows))
            _secureEnv = SecureEnvironment.Create(applicationManifest, AuthenticationType.Windows, UserActivationMode.Permanent)
        End If
    End If
Catch ex As RightsManagementException
    MessageBox.Show("ERROR: Failed to build secure environment." & vbLf & "Exception: " & ex.Message & vbLf & vbLf & ex.FailureCode.ToString() & vbLf & vbLf & ex.StackTrace, "Rights Management Exception", MessageBoxButton.OK, MessageBoxImage.Error)
    Return False
End Try

Applies to

See also