FormsAuthenticationConfiguration クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
AuthenticationMode フォームのモダリティを使用するように ASP.NET アプリケーションを構成します。
public ref class FormsAuthenticationConfiguration sealed : System::Configuration::ConfigurationElement
public sealed class FormsAuthenticationConfiguration : System.Configuration.ConfigurationElement
type FormsAuthenticationConfiguration = class
inherit ConfigurationElement
Public NotInheritable Class FormsAuthenticationConfiguration
Inherits ConfigurationElement
- 継承
例
次のコード例は、既存の Web アプリケーションの構成ファイルから FormsAuthenticationConfiguration オブジェクトを取得する方法を示しています。 このオブジェクトを使用して、そのメンバーにアクセスできます。
// 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;
' 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
注釈
FormsAuthenticationConfiguration クラスは、構成 authentication セクションの forms 要素にプログラムでアクセスして変更する方法を提供します。
この型は、FormsAuthenticationCredentials、FormsAuthenticationUserCollection、および FormsAuthenticationUser 型を含むグループの一部です。 コレクション型以外の型は、基になる構成タグに直接影響します。
警告
手記
FormsAuthenticationConfiguration は、値が MachineToApplicationセクション プロパティ AllowDefinition で定義されている制限に従って、構成ファイルの関連セクションに情報を書き込むことができます。 階層内で許可されていないレベルで構成ファイルに書き込もうとすると、パーサーによってエラー メッセージが生成されます。 ただし、このクラスを使用して、階層内の任意のレベルで構成情報を読み取ることができます。 安全性とスケーラビリティを確保するために、Azure Key Vault を使用してユーザー資格情報を格納することをお勧めします。
コンストラクター
| FormsAuthenticationConfiguration() |
FormsAuthenticationConfiguration クラスの新しいインスタンスを初期化します。 |
プロパティ
| Cookieless |
フォーム ベースの認証で Cookie を使用するかどうかを示す値を取得または設定します。 |
| CookieSameSite |
Cookie の SameSite 属性の値を取得または設定します。 |
| Credentials |
ユーザー名とパスワードの FormsAuthenticationCredentials コレクションを取得します。 |
| CurrentConfiguration |
現在の ConfigurationElement インスタンスが属している構成階層を表す最上位 Configuration インスタンスへの参照を取得します。 (継承元 ConfigurationElement) |
| DefaultUrl |
既定の URL を取得または設定します。 |
| Domain |
フォーム認証 Cookie で送信されるドメイン名を取得または設定します。 |
| ElementInformation |
ConfigurationElement オブジェクトのカスタマイズ不可能な情報と機能を含む ElementInformation オブジェクトを取得します。 (継承元 ConfigurationElement) |
| ElementProperty |
ConfigurationElement オブジェクト自体を表す ConfigurationElementProperty オブジェクトを取得します。 (継承元 ConfigurationElement) |
| EnableCrossAppRedirects |
認証されたユーザーを他のアプリケーションの URL にリダイレクトできるかどうかを示す値を取得または設定します。 |
| EvaluationContext |
ConfigurationElement オブジェクトの ContextInformation オブジェクトを取得します。 (継承元 ConfigurationElement) |
| HasContext |
CurrentConfiguration プロパティが |
| Item[ConfigurationProperty] |
この構成要素のプロパティまたは属性を取得または設定します。 (継承元 ConfigurationElement) |
| Item[String] |
この構成要素のプロパティ、属性、または子要素を取得または設定します。 (継承元 ConfigurationElement) |
| LockAllAttributesExcept |
ロックされた属性のコレクションを取得します。 (継承元 ConfigurationElement) |
| LockAllElementsExcept |
ロックされた要素のコレクションを取得します。 (継承元 ConfigurationElement) |
| LockAttributes |
ロックされた属性のコレクションを取得します。 (継承元 ConfigurationElement) |
| LockElements |
ロックされた要素のコレクションを取得します。 (継承元 ConfigurationElement) |
| LockItem |
要素がロックされているかどうかを示す値を取得または設定します。 (継承元 ConfigurationElement) |
| LoginUrl |
要求のリダイレクト URL を取得または設定します。 |
| Name |
Cookie 名を取得または設定します。 |
| Path |
Cookie パスを取得または設定します。 |
| Properties |
プロパティのコレクションを取得します。 (継承元 ConfigurationElement) |
| Protection |
Cookie の暗号化に使用する暗号化の種類を取得または設定します。 |
| RequireSSL |
認証情報を送信するときに Secure Sockets Layer (SSL) 接続が必要かどうかを示す値を取得または設定します。 |
| SlidingExpiration |
認証スライディング有効期限を取得または設定します。 |
| TicketCompatibilityMode |
チケットの有効期限に協定世界時 (UTC) と現地時刻のどちらを使用するかを示す値を取得または設定します。 |
| Timeout |
認証タイムアウトを取得または設定します。 |