FormsAuthenticationConfiguration.EnableCrossAppRedirects プロパティ

定義

認証されたユーザーを他のアプリケーションの URL にリダイレクトできるかどうかを示す値を取得または設定します。

public:
 property bool EnableCrossAppRedirects { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enableCrossAppRedirects", DefaultValue=false)]
public bool EnableCrossAppRedirects { get; set; }
[<System.Configuration.ConfigurationProperty("enableCrossAppRedirects", DefaultValue=false)>]
member this.EnableCrossAppRedirects : bool with get, set
Public Property EnableCrossAppRedirects As Boolean

プロパティ値

認証されたユーザーを他のアプリケーションの URL にリダイレクトできる場合は true。それ以外の場合は false。 既定値は false です。

属性

次のコード例は、 EnableCrossAppRedirects プロパティにアクセスする方法を示しています。 セクションを取得する方法については、 FormsAuthenticationConfiguration クラスのトピックのコード例を参照してください。

// Get the current EnableCrossAppRedirects.
bool currentEnableCrossAppRedirects =
    formsAuthentication.EnableCrossAppRedirects;

// Set the EnableCrossAppRedirects.
formsAuthentication.EnableCrossAppRedirects = false;
' Get the current EnableCrossAppRedirects.
Dim currentEnableCrossAppRedirects As Boolean =
formsAuthentication.EnableCrossAppRedirects

' Set the EnableCrossAppRedirects.
formsAuthentication.EnableCrossAppRedirects = False

注釈

EnableCrossAppRedirects プロパティの値は、構成の認証セクションの forms セクションの enableCrossAppRedirects 属性を設定します。

EnableCrossAppRedirects プロパティは、現在のアプリケーションにない URL へのリダイレクトの場合、EnableCrossAppRedirects メソッドによってチェックされます。 EnableCrossAppRedirectsが true の場合、リダイレクトが実行されます。それ以外の場合、ブラウザーは DefaultUrl プロパティで定義されているページにリダイレクトされます。

アプリケーション間でリダイレクトを実行する場合は、 form 構成セクションの属性の一部が認証されたアプリケーション間で重複していることを確認する必要があります。 詳細と例については、「 アプリケーション間のフォーム認証」を参照してください。

適用対象

こちらもご覧ください