FormsAuthenticationConfiguration.Protection プロパティとは何? わかりやすく解説 Weblio辞書 (original) (raw)

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

Cookie暗号化使用される暗号化タイプ取得または設定します

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

Visual Basic (宣言)

Public Property Protection As FormsProtectionEnum

Visual Basic (使用法)

Dim instance As FormsAuthenticationConfiguration Dim value As FormsProtectionEnum

value = instance.Protection

instance.Protection = value

C#

public FormsProtectionEnum Protection { get; set; }

C++

public: property FormsProtectionEnum Protection { FormsProtectionEnum get (); void set (FormsProtectionEnum value); }

J#

/** @property */ public FormsProtectionEnum get_Protection ()

/** @property */ public void set_Protection (FormsProtectionEnum value)

JScript

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 クラストピックにあるコード例参照してください

Visual Basic

' Get the current Protection. Dim currentProtection As FormsProtectionEnum = _ formsAuthentication.Protection

' Set the Protection property. formsAuthentication.Protection = FormsProtectionEnum.All

C#

// 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 によってサポートされていないバージョンありますサポートされているバージョンについては、「システム要件」を参照してください

バージョン情報バージョン情報

.NET Framework
サポート対象 : 2.0

参照参照

関連項目
FormsAuthenticationConfiguration クラス
FormsAuthenticationConfiguration メンバ
System.Web.Configuration 名前空間
その他の技術情報
authentication 要素 (ASP.NET 設定スキーマ)
authenticationforms 要素 (ASP.NET 設定スキーマ)
authenticationformscredentials 要素 (ASP.NET 設定スキーマ)
machineKey 要素 (ASP.NET 設定スキーマ)
ASP.NET認証