Share via


FormsAuthenticationConfiguration.LoginUrl プロパティ

定義

要求に対するリダイレクト URL を取得または設定します。

public:
 property System::String ^ LoginUrl { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("loginUrl", DefaultValue="login.aspx")]
[System.Configuration.StringValidator(MinLength=1)]
public string LoginUrl { get; set; }
[<System.Configuration.ConfigurationProperty("loginUrl", DefaultValue="login.aspx")>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.LoginUrl : string with get, set
Public Property LoginUrl As String

プロパティ値

ユーザーが認証されなかった場合に要求がリダイレクトされる URL。 既定値は login.aspx です。

属性

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

// Get the current LoginUrl.
string currentLoginUrl = formsAuthentication.LoginUrl;

// Set the LoginUrl. 
formsAuthentication.LoginUrl = "newLoginUrl";
' Get the current LoginUrl.
  Dim currentLoginUrl As String = _
  formsAuthentication.LoginUrl

' Set the LoginUrl. 
formsAuthentication.LoginUrl = "newLoginUrl"

注釈

プロパティは LoginUrl 、ユーザーが認証されていない場合、または有効な認証 Cookie が存在しない場合の要求のリダイレクト URL を指定します。

適用対象

こちらもご覧ください