次の方法で共有


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

プロパティ値

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

注意

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

適用対象

こちらもご覧ください