FormsAuthenticationConfiguration.Protection プロパティとは何? わかりやすく解説 Weblio辞書 (original) (raw)
メモ : このプロパティは、.NET Framework version 2.0 で新しく追加されたものです。
Cookie の暗号化に使用される暗号化タイプを取得または設定します。
名前空間: System.Web.Configuration
アセンブリ: System.Web (system.web.dll 内)
構文
Public Property Protection As FormsProtectionEnum
Dim instance As FormsAuthenticationConfiguration Dim value As FormsProtectionEnum
value = instance.Protection
instance.Protection = value
public FormsProtectionEnum Protection { get; set; }
public: property FormsProtectionEnum Protection { FormsProtectionEnum get (); void set (FormsProtectionEnum value); }
/** @property */ public FormsProtectionEnum get_Protection ()
/** @property */ public void set_Protection (FormsProtectionEnum value)
public function get Protection () : FormsProtectionEnum
public function set Protection (value : FormsProtectionEnum)
プロパティ値
FormsProtectionEnum 列挙値の 1 つ。既定値は All です。**メモ** データ検証と暗号化の両方を使用して Cookie を保護する場合は、このプロパティに既定値を使用するようにしてください。このオプションでは、machineKey に基づいて、設定されているデータ検証アルゴリズムを使用します。キーの長さが 48 バイト以上の場合、可能であれば 3DES (Triple-DES) が使用されます。 Cookie のセキュリティを強化するために、RequireSSL を true に設定することもできます。
Protection プロパティへのアクセス方法を次のコード例に示します。セクションを取得する方法については、FormsAuthenticationConfiguration クラスのトピックにあるコード例を参照してください。
' Get the current Protection. Dim currentProtection As FormsProtectionEnum = _ formsAuthentication.Protection
' Set the Protection property. formsAuthentication.Protection = FormsProtectionEnum.All
// Get the current Protection. FormsProtectionEnum currentProtection = formsAuthentication.Protection;
// Set the Protection property. formsAuthentication.Protection = FormsProtectionEnum.All;
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
関連項目
FormsAuthenticationConfiguration クラス
FormsAuthenticationConfiguration メンバ
System.Web.Configuration 名前空間
その他の技術情報
authentication 要素 (ASP.NET 設定スキーマ)
authentication の forms 要素 (ASP.NET 設定スキーマ)
authentication の forms の credentials 要素 (ASP.NET 設定スキーマ)
machineKey 要素 (ASP.NET 設定スキーマ)
ASP.NET の認証