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
<object property="enumerationMemberName" .../>

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

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 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Community Additions

ADD
Show:
© 2014 Microsoft