FormsAuthenticationConfiguration クラスとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > FormsAuthenticationConfiguration クラスの意味・解説 

FormsAuthenticationConfiguration クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

AuthenticationMode フォーム認証方式使用するように ASP.NET アプリケーション構成します

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

Public NotInheritable Class
 FormsAuthenticationConfiguration
    Inherits ConfigurationElement
Dim instance As FormsAuthenticationConfiguration
public sealed class FormsAuthenticationConfiguration
 : ConfigurationElement
public ref class FormsAuthenticationConfiguration
 sealed : public ConfigurationElement
public final class FormsAuthenticationConfiguration
 extends ConfigurationElement
public final class FormsAuthenticationConfiguration
 extends ConfigurationElement
解説解説

FormsAuthenticationConfiguration クラス使用すると、authentication 構成セクションforms 要素プログラムかアクセスして変更できます

この型は、FormsAuthenticationCredentials 型、FormsAuthenticationUserCollection 型、FormsAuthenticationUser 型を含むグループ一部です。コレクション以外の型は、基になる構成タグ直接影響与えます

メモメモ

FormsAuthenticationConfiguration は、値が MachineToApplication のセクション プロパティ AllowDefinition で定義される制限に従って構成ファイル関連するセクション情報書き込むことができます階層構造許可されていないレベル構成ファイル書き込み行おうとした場合パーサーによってエラー メッセージ生成されます。ただし、このクラス使用して階層構造任意のレベル構成情報読み込むことができます安全性スケーラビリティ高めるため、データベースなど、外部リポジトリ使用してユーザー資格情報維持することをお勧めます。

使用例使用例

既存Web アプリケーション構成ファイルから FormsAuthenticationConfiguration オブジェクト取得する方法次のコード例示します。このオブジェクト使用してメンバアクセスできます構成ファイルには、次のようなセットアップ格納されます。

メモ   credentials セクション使用する場合は、「ASP.NET認証」に説明されているガイドラインに従う必要がありますスケーラビリティセキュリティ高めるため、外部データベース使用してユーザー資格情報保管することをお勧めます。安全な ASP.NET アプリケーション構築する方法詳細については、Microsoft MSDN Web サイト (msdn.microsoft.com) で、「Securing Your ASP.NET Application」や「Building Secure ASP.NET Applications: Authentication, Authorization, and Secure Communication」を参照してください

<authentication mode="Forms">
  <forms name="MyAppCookie" loginUrl="login.aspx"
    defaultUrl="default.aspx"
    protection="Encryption" timeout="5" path="aspnetTest"
    slidingExpiration="false"
    cookieless="UseCookies" domain="domainName">
    <credentials passwordFormat="SHA1">
      <user name="aspnetuser1"
        password="5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8"/>
       <user name="aspnetuser2"
         password="E38AD214943DAAD1D64C102FAEC29DE4AFE9DA3D"/>
    </credentials>          
  </forms>
</authentication> 
' Get the Web application configuration.
  Dim configuration As System.Configuration.Configuration
 = _
  WebConfigurationManager.OpenWebConfiguration( _
  "/aspnetTest")

' Get the external Authentication section.
  Dim authenticationSection _
  As AuthenticationSection = _
  CType(configuration.GetSection( _
  "system.web/authentication"), AuthenticationSection)

' Get the external Forms section .
  Dim formsAuthentication _
  As FormsAuthenticationConfiguration = _
  authenticationSection.Forms

// Get the Web application configuration.
System.Configuration.Configuration configuration = 
    WebConfigurationManager.OpenWebConfiguration("/aspnetTest");

// Get the external Authentication section.
AuthenticationSection authenticationSection = 
    (AuthenticationSection)configuration.GetSection(
    "system.web/authentication");

// Get the external Forms section .
FormsAuthenticationConfiguration formsAuthentication =
    authenticationSection.Forms;

継承階層継承階層
System.Object
   System.Configuration.ConfigurationElement
    System.Web.Configuration.FormsAuthenticationConfiguration
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「FormsAuthenticationConfiguration クラス」の関連用語

FormsAuthenticationConfiguration クラスのお隣キーワード
検索ランキング

   

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



FormsAuthenticationConfiguration クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS