RightsManagementException クラス

定義

権限管理操作を正常に完了できない場合に、エラー状態を表します。

public ref class RightsManagementException : Exception
[System.Serializable]
public class RightsManagementException : Exception
public class RightsManagementException : Exception
[<System.Serializable>]
type RightsManagementException = class
    inherit Exception
type RightsManagementException = class
    inherit Exception
Public Class RightsManagementException
Inherits Exception
継承
RightsManagementException
属性

次の例は、 RightsManagementException.

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

コンストラクター

RightsManagementException()

RightsManagementException クラスの新しいインスタンスを初期化します。

RightsManagementException(RightsManagementFailureCode)

指定した RightsManagementException を使用して、RightsManagementFailureCode クラスの新しいインスタンスを初期化します。

RightsManagementException(RightsManagementFailureCode, Exception)

指定した RightsManagementException および RightsManagementFailureCode を使用して、InnerException クラスの新しいインスタンスを初期化します。

RightsManagementException(RightsManagementFailureCode, String)

指定した RightsManagementException および RightsManagementFailureCode を使用して、Message クラスの新しいインスタンスを初期化します。

RightsManagementException(RightsManagementFailureCode, String, Exception)

指定した RightsManagementExceptionRightsManagementFailureCode、および Message を使用して、InnerException クラスの新しいインスタンスを初期化します。

RightsManagementException(SerializationInfo, StreamingContext)

RightsManagementException クラスの新しいインスタンスを初期化し、例外に関する情報を使用して SerializationInfo ストアを設定します。

RightsManagementException(String)

指定したメッセージを使用して、RightsManagementException クラスの新しいインスタンスを初期化します。

RightsManagementException(String, Exception)

指定した RightsManagementException および Message を使用して、InnerException クラスの新しいインスタンスを初期化します。

プロパティ

Data

例外に関する追加のユーザー定義情報を提供する、キーと値のペアのコレクションを取得します。

(継承元 Exception)
FailureCode

エラーの RightsManagementFailureCode を取得します。

HelpLink

この例外に関連付けられているヘルプ ファイルへのリンクを取得または設定します。

(継承元 Exception)
HResult

特定の例外に割り当てられているコード化数値である HRESULT を取得または設定します。

(継承元 Exception)
InnerException

現在の例外の原因となる Exception インスタンスを取得します。

(継承元 Exception)
Message

現在の例外を説明するメッセージを取得します。

(継承元 Exception)
Source

エラーの原因となるアプリケーションまたはオブジェクトの名前を取得または設定します。

(継承元 Exception)
StackTrace

呼び出し履歴で直前のフレームの文字列形式を取得します。

(継承元 Exception)
TargetSite

現在の例外がスローされたメソッドを取得します。

(継承元 Exception)

メソッド

Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetBaseException()

派生クラスでオーバーライドされた場合、それ以後に発生する 1 つ以上の例外の根本原因である Exception を返します。

(継承元 Exception)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetObjectData(SerializationInfo, StreamingContext)

パラメーター名と例外に関する情報を使用して SerializationInfo ストアを設定します。

GetType()

現在のインスタンスのランタイム型を取得します。

(継承元 Exception)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
ToString()

現在の例外の文字列形式を作成して返します。

(継承元 Exception)

events

SerializeObjectState
互換性のために残されています。

例外がシリアル化され、例外に関するシリアル化されたデータを含む例外状態オブジェクトが作成されたときに発生します。

(継承元 Exception)

適用対象

こちらもご覧ください