RightsManagementFailureCode Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies error conditions that can occur when performing a rights management operation.
public enum class RightsManagementFailureCode
public enum RightsManagementFailureCode
type RightsManagementFailureCode =
Public Enum RightsManagementFailureCode
- Inheritance
Fields
Name | Value | Description |
---|---|---|
ManifestPolicyViolation | -2147183860 | An operation is in violation of the rights management manifest policy. |
InvalidLicense | -2147168512 | The license structure in one of the certificates is invalid. |
InfoNotInLicense | -2147168511 | When creating a bound license, an issuance license, not an end-use license, was specified. |
InvalidLicenseSignature | -2147168510 | Rights management signed digital certificate cannot be validated. (The signed certificate may have been tampered.) |
EncryptionNotPermitted | -2147168508 | Encryption is not permitted. |
RightNotGranted | -2147168507 | The current user does not have rights to access the protected content. |
InvalidVersion | -2147168506 | The rights management version is incorrect. |
InvalidEncodingType | -2147168505 | The specified encoding type is invalid. |
InvalidNumericalValue | -2147168504 | The numeric value specified is invalid. |
InvalidAlgorithmType | -2147168503 | The algorithm type specified is invalid. |
EnvironmentNotLoaded | -2147168502 | The SecureEnvironment cannot load. |
EnvironmentCannotLoad | -2147168501 | The SecureEnvironment cannot load. |
TooManyLoadedEnvironments | -2147168500 | Too many SecureEnvironment instance have been created. |
IncompatibleObjects | -2147168498 | An object type passed is incompatible with this operation. |
LibraryFail | -2147168497 | A library operation failed. |
EnablingPrincipalFailure | -2147168496 | The specified principal cannot be enabled. |
InfoNotPresent | -2147168495 | Some information is missing. |
BadGetInfoQuery | -2147168494 | An invalid constant was passed. |
KeyTypeUnsupported | -2147168493 | The key type specified in a key/value pair is not supported. |
CryptoOperationUnsupported | -2147168492 | A cryptographic operation that was requested is not supported. For example, passing an RMS encrypting object for decrypting purposes. |
ClockRollbackDetected | -2147168491 | Clock rollback has been detected. Protected content cannot be accessed. |
QueryReportsNoResults | -2147168490 | No instances of the requested attribute exist. |
UnexpectedException | -2147168489 | An unspecified error occurred. Also thrown when an application runs in debug mode. |
BindValidityTimeViolated | -2147168488 | The defined time period for the protected content has expired; access is no longer permitted. |
BrokenCertChain | -2147168487 | The rights management certificate chain is broken. |
BindPolicyViolation | -2147168485 | The current user does not have rights to access the protected content. |
BindRevokedLicense | -2147168484 | The current user does not have rights to access the protected content. |
BindRevokedIssuer | -2147168483 | The current user does not have rights to access the protected content. |
BindRevokedPrincipal | -2147168482 | The current user does not have rights to access the protected content. |
BindRevokedResource | -2147168481 | The current user does not have rights to access the protected content. |
BindRevokedModule | -2147168480 | Rights management services are not properly configured. |
BindContentNotInEndUseLicense | -2147168479 | The specified resource is not contained in any WORK node of the license. |
BindAccessPrincipalNotEnabling | -2147168478 | The access condition is not matched to the enabling principal that is handed into the bind. |
BindAccessUnsatisfied | -2147168477 | The current user does not satisfy the conditions defined in the End Use License (EUL). |
BindIndicatedPrincipalMissing | -2147168476 | The enabling principal does not match the issued principal of the End Use License (EUL). |
BindMachineNotFoundInGroupIdentity | -2147168475 | The current machine is not defined within the rights managed group identity. |
LibraryUnsupportedPlugIn | -2147168474 | The specified library plug-in is not supported. |
BindRevocationListStale | -2147168473 | The license requires that a new revocation list must be acquired. |
BindNoApplicableRevocationList | -2147168472 | The current user does not have rights to access the protected content. |
InvalidHandle | -2147168468 | Either the environment or the enabling principal handle is invalid. |
BindIntervalTimeViolated | -2147168465 | The defined time period for the protected content has expired; access is no longer permitted. |
BindNoSatisfiedRightsGroup | -2147168464 | The specified rights group is not contained in the End Use License (EUL). |
BindSpecifiedWorkMissing | -2147168463 | The End Use License (EUL) contains no WORK node. |
NoMoreData | -2147168461 | No license or certificate exists at the specified index. |
LicenseAcquisitionFailed | -2147168460 | An End Use License (EUL) could not be acquired from the rights management server. |
IdMismatch | -2147168459 | The content ID from the license does not match the content ID the license storage session. |
TooManyCertificates | -2147168458 | The number of certificates has exceeded the maximum number allowed. |
NoDistributionPointUrlFound | -2147168457 | The protected content is corrupted. |
AlreadyInProgress | -2147168456 | The requested operation is already in progress. |
GroupIdentityNotSet | -2147168455 | A user name was not specified for the client session. |
RecordNotFound | -2147168454 | The specified license was not found. |
NoConnect | -2147168453 | Rights management cannot connect to the URI specified for the license server. |
NoLicense | -2147168452 | A required license is not available. |
NeedsMachineActivation | -2147168451 | The computer must be activated before the user can be activated. |
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. |
ActivationFailed | -2147168448 | License activation failed; rights management services are not properly configured. |
Aborted | -2147168447 | Asynchronous operation canceled, or a non-recoverable error has occurred. |
OutOfQuota | -2147168446 | The license server's maximum quota of End Use Licenses (EULs) has been reached. |
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. |
ServerError | -2147168444 | Rights management services are not properly configured. |
InstallationFailed | -2147168443 | An installation operation failed. |
HidCorrupted | -2147168442 | The Hardware ID (HID) used in a machine activation attempt is incorrectly formatted. Rights management services are not properly configured. |
InvalidServerResponse | -2147168441 | Rights management services are not properly configured. |
ServiceNotFound | -2147168440 | Rights management services are not properly configured. |
UseDefault | -2147168439 | If a request is made for computer activation or a rights account certificate, receiving UseDefault indicates that the application should pass |
ServerNotFound | -2147168438 | Rights management services are not properly configured. |
InvalidEmail | -2147168437 | RMS Server email address verification failed. |
ValidityTimeViolation | -2147168436 | The defined time period for the protected content has expired; access is no longer permitted. |
OutdatedModule | -2147168435 | Rights management services are not properly configured. |
NotSet | -2147168434 | The item requested to delete does not exist. |
MetadataNotSet | -2147168433 | The specified metadata could net be set. |
RevocationInfoNotSet | -2147168432 | Certificate or license revocation information has not been set. |
InvalidTimeInfo | -2147168431 | The time information specified is invalid. |
RightNotSet | -2147168430 | The requested right was not specified when the content was published with rights management. |
LicenseBindingToWindowsIdentityFailed | -2147168429 | The current user credentials are not valid for acquiring a license. |
InvalidIssuanceLicenseTemplate | -2147168428 | The Rights Management Services template contains one or more errors. |
InvalidKeyLength | -2147168427 | The key length specified in a key/value pair is invalid. |
ExpiredOfficialIssuanceLicenseTemplate | -2147168425 | The authorized time period defined in the issuance license template has expired; access is no longer permitted. |
InvalidClientLicensorCertificate | -2147168424 | Rights management services are not properly configured. |
HidInvalid | -2147168423 | The Hardware ID (HID) used in a machine activation attempt is invalid. Rights management services are not properly configured. |
EmailNotVerified | -2147168422 | The user's email address cannot be verified. |
ServiceMoved | -2147168421 | Rights management services are not properly configured. |
ServiceGone | -2147168420 | Rights management services are not properly configured. |
AdEntryNotFound | -2147168419 | The current user was not found in the Active Directory (AD) for certification under Windows authentication. |
NotAChain | -2147168418 | Rights managed content is corrupted. |
RequestDenied | -2147168417 | The Rights Management server does not allow temporary certification of the current user. |
DebuggerDetected | -2147168416 | Cannot open or publish content with restricted permissions because a debugger has been detected. |
InvalidLockboxType | -2147168400 | Rights management services are not properly configured. |
InvalidLockboxPath | -2147168399 | Rights management services are not properly configured. |
InvalidRegistryPath | -2147168398 | The specified registry path is invalid. |
NoAesCryptoProvider | -2147168397 | Rights management services are not properly configured. |
GlobalOptionAlreadySet | -2147168396 | The option specified has already been set. |
OwnerLicenseNotFound | -2147168395 | The document does not contain an Owner License. |
Success | 0 | Operation has competed successfully. |
Examples
The following example shows use of the FailureCode and Message properties to create an error message for the user.
WriteStatus(" Building secure environment.");
try
{
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));
}
else
{
_secureEnv = SecureEnvironment.Create(
applicationManifest,
AuthenticationType.Windows,
UserActivationMode.Permanent);
}
}
}
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.")
Try
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))
Else
_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