Вот что я делаю:
//First delete
aspnet_regiis -pz MyKeyName
//Create the container
aspnet_regiis -pc MyKeyName -exp
//Install the key into a machine-level RSA key provider
aspnet_regiis -pi MyKeyName pathToKeyFile
//Encrypt
aspnet_regiis -pef "connectionStrings" -prov pathToWebConfigFile
//So that's all good so far. If I want I can now decrypt which runs just fine on the same machine:
aspnet_regiis -pdf "connectionStrings"
Теперь я беру зашифрованный файл, переношу его на другой компьютер и установлю тот же ключ (полученный от экспорта моего ключа с помощью aspnet_regiis -px "MyKeyName" "C: \ MyKeyName.xml" -pri).
Теперь, когда я запускаю ту же команду расшифровки, я получаю сообщение об ошибке «Ошибка расшифровки ... Неверные данные ...»
Что мне здесь не хватает ???