SectionInformation.ProtectionProvider Eigenschaft

Definition

Ruft den Anbieter für geschützte Konfigurationen für den zugeordneten Konfigurationsabschnitt ab.

public:
 property System::Configuration::ProtectedConfigurationProvider ^ ProtectionProvider { System::Configuration::ProtectedConfigurationProvider ^ get(); };
public System.Configuration.ProtectedConfigurationProvider ProtectionProvider { get; }
member this.ProtectionProvider : System.Configuration.ProtectedConfigurationProvider
Public ReadOnly Property ProtectionProvider As ProtectedConfigurationProvider

Eigenschaftswert

Der geschützte Konfigurationsanbieter für dieses ConfigurationSection-Objekt.

Beispiele

Das folgende Beispiel zeigt, wie Der ProtectSection Wert eines ConfigurationSection Objekts abgerufen wird.

static public void GetProtectionProvider()
{
    SectionInformation sInfo =
        GetSectionInformation();

    ProtectedConfigurationProvider pp = 
        sInfo.ProtectionProvider;
    if (pp == null)
        Console.WriteLine("Protection provider is null");
    else
        Console.WriteLine("Protection provider: {0}", 
            pp.ToString());
}
Public Shared Sub GetProtectionProvider()

    Dim sInfo As SectionInformation = _
    GetSectionInformation()

    Dim pp _
    As ProtectedConfigurationProvider = _
    sInfo.ProtectionProvider
    If pp Is Nothing Then
        Console.WriteLine("Protection provider is null")
    Else
        Console.WriteLine("Protection provider: {0}", _
        pp.ToString())
    End If

End Sub

Hinweise

Bei nicht geschützten Abschnitten ist nulldie ProtectionProvider -Eigenschaft .

Weitere Informationen zu geschützten Konfigurationsabschnitten finden Sie unter Verschlüsseln von Konfigurationsinformationen mithilfe der geschützten Konfiguration.

Gilt für:

Weitere Informationen