SectionInformation.ProtectionProvider Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the protected configuration provider for the associated configuration section.
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
Property Value
The protected configuration provider for this ConfigurationSection object.
Examples
The following example shows how to get the ProtectSection value of a ConfigurationSection object.
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
Remarks
For unprotected sections, the ProtectionProvider property is null
.
For more information about protected configuration sections, see Encrypting Configuration Information Using Protected Configuration.
Applies to
See also
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應