static void EncryptionandDecyption(string exeConfigName)
{
try
{
Configuration config = ConfigurationManager.OpenExeConfiguration(exeConfigName);
AppSettingsSection section = config.GetSection("appSettings") as AppSettingsSection;
if (section.SectionInformation.IsProtected)
{
//section.SectionInformation.UnprotectSection();
}
else
{
section.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
}
config.Save();
}
catch (Exception ex)
{
}
}
For Further detail refer to these books.
No comments:
Post a Comment