私は以前に問題が発生しています。それを解決する方法についての私の参照を見つけることができません。App.config接続文字列保護エラー
ここが問題です。問題は、我々は販売員の休暇を持っていたある
config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None)
If config.ConnectionStrings.SectionInformation.IsProtected = False Then
config.ConnectionStrings.SectionInformation.ProtectSection(Nothing)
' We must save the changes to the configuration file.'
config.Save(ConfigurationSaveMode.Modified, True)
End If
:私たちは、以下のコードを使用して、当社のクライアントアプリケーションのためのapp.configの接続文字列セクションを暗号化します。古いラップトップは新しい営業担当者になり、新しいユーザーのログインの下でこれを実行しようとするとエラーが発生します。エラーは次のとおりです。
Unhandled Exception: System.Configuration.ConfigurationErrorsException:
An error occurred executing the configuration section handler for connectionStrings. ---> System.Configuration.ConfigurationErrorsException: Failed to encrypt the section 'connectionStrings' using provider 'RsaProtectedConfigurationProvider'.
Error message from the provider: Object already exists.
---> System.Security.Cryptography.CryptographicException: Object already exists
Vista以上の場合は、管理者として実行していることを確認してください。 –