Aracılığıyla paylaş


FormsAuthenticationConfiguration.Protection Özellik

Tanım

Tanımlama bilgisini şifrelemek için kullanılan şifreleme türünü alır veya ayarlar.

public:
 property System::Web::Configuration::FormsProtectionEnum Protection { System::Web::Configuration::FormsProtectionEnum get(); void set(System::Web::Configuration::FormsProtectionEnum value); };
[System.Configuration.ConfigurationProperty("protection", DefaultValue=System.Web.Configuration.FormsProtectionEnum.All)]
public System.Web.Configuration.FormsProtectionEnum Protection { get; set; }
[<System.Configuration.ConfigurationProperty("protection", DefaultValue=System.Web.Configuration.FormsProtectionEnum.All)>]
member this.Protection : System.Web.Configuration.FormsProtectionEnum with get, set
Public Property Protection As FormsProtectionEnum

Özellik Değeri

FormsProtectionEnum

FormsProtectionEnum Numaralandırma değerlerinden biri. All varsayılan değerdir.

Not Tanımlama bilgisinin korunmasına yardımcı olmak için hem veri doğrulama hem de şifreleme istiyorsanız bu özellik için varsayılan değeri kullandığınızdan emin olun. Bu seçenek, temelinde yapılandırılmış veri doğrulama algoritmasını machineKeykullanır. Üçlü DES (3DES), kullanılabilir durumdaysa ve anahtar yeterince uzunsa (48 bayt veya daha fazla), şifreleme için kullanılır.

Tanımlama bilginizin korumasını geliştirmek için değerini olarak da ayarlayabilirsiniz RequireSSL true.

Öznitelikler

Örnekler

Aşağıdaki kod örneği özelliğine nasıl erişeceklerini Protection gösterir. Bölümü nasıl edineceğinizi öğrenmek için sınıf konusunun kod örneğine FormsAuthenticationConfiguration bakın.

// Get the current Protection.
FormsProtectionEnum currentProtection = 
    formsAuthentication.Protection;

// Set the Protection property.
formsAuthentication.Protection = 
    FormsProtectionEnum.All;
' Get the current Protection.
  Dim currentProtection As FormsProtectionEnum = _
  formsAuthentication.Protection

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

Şunlara uygulanır

Ayrıca bkz.