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