JHSectionEncrypt.ProtectWebSection Method

DCSoft.DBUtilityGeneric

JHSectionEncryptProtectWebSection Method
针对 Web 站点根目录下的配置文件,标记配置节,并进行保护(.Net 程序会自行解密),异常将直接抛出

Namespace: DCSoft.Utility.Configuration
Assembly: DCSoft.Utility (in DCSoft.Utility.dll) Version: 0.0.0.0 (1.0.0.0)
Syntax
C#
public static bool ProtectWebSection(
	string sectionName,
	ProviderType providerType
)

Parameters

sectionName
Type: SystemString
配置节的名称或路径
providerType
Type: DCSoft.UtilityProviderType
保护程序类型

Return Value

Type: Boolean
返回一个值,该值指示当前保存节是否成功
Exceptions
ExceptionCondition
ArgumentNullExceptionsectionName is null.
See Also