RightsManagementFailureCode 枚举

定义

指定执行权限管理操作时可能发生的错误条件。

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

字段

名称 说明
ManifestPolicyViolation -2147183860

操作违反了权限管理清单策略。

InvalidLicense -2147168512

其中一个证书中的许可证结构无效。

InfoNotInLicense -2147168511

创建绑定许可证时,指定了颁发许可证,而不是最终用户许可证。

InvalidLicenseSignature -2147168510

无法验证权限管理签名的数字签名证书。 (签名的证书可能已被篡改。

EncryptionNotPermitted -2147168508

不允许加密。

RightNotGranted -2147168507

当前用户无权访问受保护的内容。

InvalidVersion -2147168506

权限管理版本不正确。

InvalidEncodingType -2147168505

指定的编码类型无效。

InvalidNumericalValue -2147168504

指定的数值无效。

InvalidAlgorithmType -2147168503

指定的算法类型无效。

EnvironmentNotLoaded -2147168502

无法 SecureEnvironment 加载。

EnvironmentCannotLoad -2147168501

无法 SecureEnvironment 加载。

TooManyLoadedEnvironments -2147168500

已创建过多 SecureEnvironment 实例。

IncompatibleObjects -2147168498

传递的对象类型与此操作不兼容。

LibraryFail -2147168497

库操作失败。

EnablingPrincipalFailure -2147168496

无法启用指定的主体。

InfoNotPresent -2147168495

缺少一些信息。

BadGetInfoQuery -2147168494

传递了无效的常量。

KeyTypeUnsupported -2147168493

不支持在键/值对中指定的键类型。

CryptoOperationUnsupported -2147168492

不支持请求的加密操作。 例如,传递 RMS 加密对象以进行解密。

ClockRollbackDetected -2147168491

检测到时钟回滚。 无法访问受保护的内容。

QueryReportsNoResults -2147168490

请求的属性实例不存在。

UnexpectedException -2147168489

发生未指定的错误。 当应用程序在调试模式下运行时也引发。

BindValidityTimeViolated -2147168488

受保护内容的定义的时间段已过期;不再允许访问。

BrokenCertChain -2147168487

权限管理证书链已中断。

BindPolicyViolation -2147168485

当前用户无权访问受保护的内容。

BindRevokedLicense -2147168484

当前用户无权访问受保护的内容。

BindRevokedIssuer -2147168483

当前用户无权访问受保护的内容。

BindRevokedPrincipal -2147168482

当前用户无权访问受保护的内容。

BindRevokedResource -2147168481

当前用户无权访问受保护的内容。

BindRevokedModule -2147168480

权限管理服务未正确配置。

BindContentNotInEndUseLicense -2147168479

指定的资源不包含在许可证的任何 WORK 节点中。

BindAccessPrincipalNotEnabling -2147168478

访问条件与传递给绑定的启用主体不匹配。

BindAccessUnsatisfied -2147168477

当前用户不满足最终用户许可证(EUL)中定义的条件。

BindIndicatedPrincipalMissing -2147168476

启用主体与已颁发的最终用户许可证(EUL)主体不匹配。

BindMachineNotFoundInGroupIdentity -2147168475

当前计算机未在权限托管组标识中定义。

LibraryUnsupportedPlugIn -2147168474

不支持指定的库插件。

BindRevocationListStale -2147168473

许可证要求必须获取新的吊销列表。

BindNoApplicableRevocationList -2147168472

当前用户无权访问受保护的内容。

InvalidHandle -2147168468

环境或启用主体句柄无效。

BindIntervalTimeViolated -2147168465

受保护内容的定义的时间段已过期;不再允许访问。

BindNoSatisfiedRightsGroup -2147168464

指定的权限组不包含在“最终用户许可证”(EUL)中。

BindSpecifiedWorkMissing -2147168463

最终用户许可证(EUL)不包含 WORK 节点。

NoMoreData -2147168461

指定索引处不存在许可证或证书。

LicenseAcquisitionFailed -2147168460

无法从权限管理服务器获取最终使用许可证(EUL)。

IdMismatch -2147168459

许可证中的内容 ID 与许可证存储会话的内容 ID 不匹配。

TooManyCertificates -2147168458

证书数已超过允许的最大数目。

NoDistributionPointUrlFound -2147168457

受保护的内容已损坏。

AlreadyInProgress -2147168456

请求的操作已在进行中。

GroupIdentityNotSet -2147168455

未为客户端会话指定用户名。

RecordNotFound -2147168454

找不到指定的许可证。

NoConnect -2147168453

权限管理无法连接到为许可证服务器指定的 URI。

NoLicense -2147168452

必需的许可证不可用。

NeedsMachineActivation -2147168451

必须先激活计算机,然后才能激活用户。

NeedsGroupIdentityActivation -2147168450

未激活用户,或者未提交权限帐户证书(RAC),并且许可证存储中未找到任何权限帐户证书,以匹配与此会话关联的许可证。

ActivationFailed -2147168448

许可证激活失败;权限管理服务未正确配置。

Aborted -2147168447

异步操作已取消,或者发生了不可恢复的错误。

OutOfQuota -2147168446

已达到许可证服务器的最终使用许可证(EULS)的最大配额。

AuthenticationFailed -2147168445

Internet 请求返回的可能身份验证错误(HTTP 错误 401)。 或者,当前用户在无提示用户激活尝试中没有有效的域凭据。 或者,无提示用户激活中的认证服务器不在本地 Intranet 或受信任的站点区域中。

ServerError -2147168444

权限管理服务未正确配置。

InstallationFailed -2147168443

安装操作失败。

HidCorrupted -2147168442

计算机激活尝试中使用的硬件 ID(HID)格式不正确。 权限管理服务未正确配置。

InvalidServerResponse -2147168441

权限管理服务未正确配置。

ServiceNotFound -2147168440

权限管理服务未正确配置。

UseDefault -2147168439

如果对计算机激活或权限帐户证书发出请求,则 UseDefault 接收指示应用程序应传入 null ActServInfo 参数。

ServerNotFound -2147168438

权限管理服务未正确配置。

InvalidEmail -2147168437

RMS 服务器电子邮件地址验证失败。

ValidityTimeViolation -2147168436

受保护内容的定义的时间段已过期;不再允许访问。

OutdatedModule -2147168435

权限管理服务未正确配置。

NotSet -2147168434

请求删除的项不存在。

MetadataNotSet -2147168433

可以设置指定的元数据。

RevocationInfoNotSet -2147168432

尚未设置证书或许可证吊销信息。

InvalidTimeInfo -2147168431

指定的时间信息无效。

RightNotSet -2147168430

当使用权限管理发布内容时,未指定请求的权限。

LicenseBindingToWindowsIdentityFailed -2147168429

当前用户凭据对于获取许可证无效。

InvalidIssuanceLicenseTemplate -2147168428

Rights Management Services 模板包含一个或多个错误。

InvalidKeyLength -2147168427

键/值对中指定的密钥长度无效。

ExpiredOfficialIssuanceLicenseTemplate -2147168425

颁发许可证模板中定义的授权时间段已过期;不再允许访问。

InvalidClientLicensorCertificate -2147168424

权限管理服务未正确配置。

HidInvalid -2147168423

计算机激活尝试中使用的硬件 ID(HID)无效。 权限管理服务未正确配置。

EmailNotVerified -2147168422

无法验证用户的电子邮件地址。

ServiceMoved -2147168421

权限管理服务未正确配置。

ServiceGone -2147168420

权限管理服务未正确配置。

AdEntryNotFound -2147168419

在Active Directory(AD)中找不到当前用户,用于Windows 身份验证下的认证。

NotAChain -2147168418

权限托管内容已损坏。

RequestDenied -2147168417

Rights Management 服务器不允许对当前用户进行临时认证。

DebuggerDetected -2147168416

无法打开或发布具有受限权限的内容,因为检测到调试器。

InvalidLockboxType -2147168400

权限管理服务未正确配置。

InvalidLockboxPath -2147168399

权限管理服务未正确配置。

InvalidRegistryPath -2147168398

指定的注册表路径无效。

NoAesCryptoProvider -2147168397

权限管理服务未正确配置。

GlobalOptionAlreadySet -2147168396

已设置指定的选项。

OwnerLicenseNotFound -2147168395

文档不包含所有者许可证。

Success 0

操作已成功竞争。

示例

以下示例演示如何使用 FailureCodeMessage 属性为用户创建错误消息。

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

适用于

另请参阅