Export (0) Print
Expand All

RightsManagementFailureCode Enumeration

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

Namespace: System.Security.RightsManagement
Assembly: WindowsBase (in windowsbase.dll)

public enum RightsManagementFailureCode
public enum RightsManagementFailureCode
public enum RightsManagementFailureCode
<object property="EnumerationValue" .../>

 Member nameDescription
AbortedAsynchronous operation canceled, or a non-recoverable error has occurred. 
ActivationFailedLicense activation failed; rights management services are not properly configured. 
AdEntryNotFoundThe current user was not found in the Active Directory (AD) for certification under Windows authentication. 
AlreadyInProgressThe requested operation is already in progress. 
AuthenticationFailedPossible 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. 
BadGetInfoQueryAn invalid constant was passed. 
BindAccessPrincipalNotEnablingThe access condition is not matched to the enabling principal that is handed into the bind. 
BindAccessUnsatisfiedThe current user does not satisfy the conditions defined in the End Use License (EUL). 
BindContentNotInEndUseLicenseThe specified resource is not contained in any WORK node of the license. 
BindIndicatedPrincipalMissingThe enabling principal does not match the issued principal of the End Use License (EUL). 
BindIntervalTimeViolatedThe defined time period for the protected content has expired; access is no longer permitted. 
BindMachineNotFoundInGroupIdentityThe current machine is not defined within the rights managed group identity. 
BindNoApplicableRevocationListThe current user does not have rights to access the protected content. 
BindNoSatisfiedRightsGroupThe specified rights group is not contained in the End Use License (EUL). 
BindPolicyViolationThe current user does not have rights to access the protected content. 
BindRevocationListStaleThe license requires that a new revocation list must be acquired. 
BindRevokedIssuerThe current user does not have rights to access the protected content. 
BindRevokedLicenseThe current user does not have rights to access the protected content. 
BindRevokedModuleRights management services are not properly configured. 
BindRevokedPrincipalThe current user does not have rights to access the protected content. 
BindRevokedResourceThe current user does not have rights to access the protected content. 
BindSpecifiedWorkMissingThe End Use License (EUL) contains no WORK node. 
BindValidityTimeViolatedThe defined time period for the protected content has expired; access is no longer permitted. 
BrokenCertChainThe rights management certificate chain is broken. 
ClockRollbackDetectedClock rollback has been detected. Protected content cannot be accessed. 
CryptoOperationUnsupportedA cryptographic operation that was requested is not supported. For example, passing an RMS encrypting object for decrypting purposes. 
DebuggerDetectedCannot open or publish content with restricted permissions because a debugger has been detected.  
EmailNotVerifiedThe user's email address cannot be verified. 
EnablingPrincipalFailureThe specified principal cannot be enabled 
EncryptionNotPermittedEncryption is not permitted.  
EnvironmentCannotLoadThe SecureEnvironment cannot load. 
EnvironmentNotLoadedThe SecureEnvironment cannot load. 
ExpiredOfficialIssuanceLicenseTemplateThe authorized time period defined in the issuance license template has expired; access is no longer permitted. 
GlobalOptionAlreadySetThe option specified has already been set.  
GroupIdentityNotSetA user name was not specified for the client session 
HidCorruptedThe Hardware ID (HID) used in a machine activation attempt is incorrectly formatted. Rights management services are not properly configured.  
HidInvalidThe Hardware ID (HID) used in a machine activation attempt is invalid. Rights management services are not properly configured. 
IdMismatchThe content ID from the license does not match the content ID the license storage session 
IncompatibleObjectsAn object type passed is incompatible with this operation. 
InfoNotInLicenseWhen creating a bound license, an issuance license, not an end-use license, was specified. 
InfoNotPresentSome information is missing. 
InstallationFailedAn installation operation failed. 
InvalidAlgorithmTypeThe algorithm type specified is invalid. 
InvalidClientLicensorCertificateRights management services are not properly configured. 
InvalidEmailRMS Server email address verification failed. 
InvalidEncodingTypeThe specified encoding type is invalid.  
InvalidHandleEither the environment or the enabling principal handle is invalid.  
InvalidIssuanceLicenseTemplateThe Rights Management Services template contains one or more errors. 
InvalidKeyLengthThe key length specified in a key/value pair is invalid.  
InvalidLicenseThe license structure in one of the certificates is invalid.  
InvalidLicenseSignatureRights management signed digital certificate cannot be validated. (The signed certificate may have been tampered.) 
InvalidLockboxPathRights management services are not properly configured. 
InvalidLockboxTypeRights management services are not properly configured. 
InvalidNumericalValueThe numeric value specified is invalid. 
InvalidRegistryPathThe specified registry path is invalid. 
InvalidServerResponseRights management services are not properly configured. 
InvalidTimeInfoThe time information specified is invalid. 
InvalidVersionThe rights management version is incorrect. 
KeyTypeUnsupportedThe key type specified in a key/value pair is not supported. 
LibraryFailA library operation failed. 
LibraryUnsupportedPlugInThe specified library plug-in is not supported. 
LicenseAcquisitionFailedAn End Use License (EUL) could not be acquired from the rights management server. 
LicenseBindingToWindowsIdentityFailedThe current user credentials are not valid for acquiring a license. 
ManifestPolicyViolationAn operation is in violation of the rights management manifest policy. 
MetadataNotSetThe specified metadata could net be set. 
NeedsGroupIdentityActivationThe 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. 
NeedsMachineActivationThe computer must be activated before the user can be activated.  
NoAesCryptoProviderRights management services are not properly configured. 
NoConnectRights management cannot connect to the URI specified for the license server. 
NoDistributionPointUrlFoundThe protected content is corrupted. 
NoLicenseA required license is not available. 
NoMoreDataNo license or certificate exists at the specified index.  
NotAChainRights managed content is corrupted. 
NotSetThe item requested to delete does not exist.  
OutdatedModuleRights management services are not properly configured. 
OutOfQuotaThe license server's maximum quota of End Use Licenses (EULs) has been reached. 
OwnerLicenseNotFoundThe document does not contain an Owner License. 
QueryReportsNoResultsNo instances of the requested attribute exist.  
RecordNotFoundThe specified license was not found.  
RequestDeniedThe Rights Management server does not allow temporary certification of the current user. 
RevocationInfoNotSetCertificate or license revocation information has not been set. 
RightNotGrantedThe current user does not have rights to access the protected content. 
RightNotSetThe requested right was not specified when the content was published with rights management. 
ServerErrorRights management services are not properly configured. 
ServerNotFoundRights management services are not properly configured. 
ServiceGoneRights management services are not properly configured. 
ServiceMovedRights management services are not properly configured. 
ServiceNotFoundRights management services are not properly configured. 
SuccessOperation has competed successfully. 
TooManyCertificatesThe number of certificates has exceeded the maximum number allowed. 
TooManyLoadedEnvironmentsToo many SecureEnvironment instance have been created. 
UnexpectedExceptionAn unspecified error occurred. Also thrown when an application runs in debug mode.  
UseDefaultIf a request is made for computer activation or a rights account certificate, receiving UseDefault indicates that the application should pass a null reference (Nothing in Visual Basic) into the ActServInfo parameter 
ValidityTimeViolationThe 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. For the full sample, see Rights Managed Package Publish Sample.

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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft