HttpRequest.IsAuthenticated プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > HttpRequest.IsAuthenticated プロパティの意味・解説 

HttpRequest.IsAuthenticated プロパティ

要求が認証されているかどうかを示す値を取得します。

名前空間: System.Web
アセンブリ: System.Web (system.web.dll 内)
構文構文

Dim instance As HttpRequest
Dim value As Boolean

value = instance.IsAuthenticated
public bool IsAuthenticated { get;
 }
public:
property bool IsAuthenticated {
    bool get ();
}
/** @property */
public boolean get_IsAuthenticated ()
public function get IsAuthenticated
 () : boolean

プロパティ値
要求が認証されている場合は true。それ以外の場合は false。

使用例使用例

IsAuthenticated プロパティを使用して、現在の要求が認証されているかどうかを確認するコード例を次に示します。認証されていない場合、その要求は、ユーザーが自分の資格情報を Web アプリケーションに入力できる別のページにリダイレクトされます。これは、アプリケーションの既定のページで使用される一般的な手法です。

Private Sub Page_Load(sender As
 Object, e As EventArgs)
    ' Check whether the current request has been
    ' authenticated. If it has not, redirect the 
    ' user to the Login.aspx page.
    If (Request.IsAuthenticated = False) Then
        Response.Redirect("Login.aspx")
    End If
End Sub
private void Page_Load(object sender, EventArgs
 e)
{
    // Check whether the current request has been
    // authenticated. If it has not, redirect the 
    // user to the Login.aspx page.
    if (!Request.IsAuthenticated)
    {
        Response.Redirect("Login.aspx");
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

HttpRequest.IsAuthenticated プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



HttpRequest.IsAuthenticated プロパティのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS