шифрование app.config
От: navab  
Дата: 10.06.13 11:35
Оценка:
Возникла проблема при шифровании app.config. При старте приложения выполняется проверка, если секции не зашифрованы – зашифровать.


Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
if (!config.GetSection("appSettings").SectionInformation.IsProtected)
{
Settings settings = new Settings (ProtectionProvider.RSAProtectionProvider, config);
    settings.EncryptWholeConfiguration();
    ConfigurationManager.RefreshSection("configuration");
}


Если затем конфиг изменить, схранить и попытаться считать вылетает следующая ошибка:
"Unrecognized attribute 'configProtectionProvider'. Note that attribute names are case-sensitive.”
Source: "System.Configuration"
Посоветуйте, пжст, как решить.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.