locked
RSAProtectedConfigurationProvider or DataProtectionConfigurationProvider for encryption of web.config RRS feed

  • Question

  • User-1188570427 posted

    I would like to use: RSAProtectedConfigurationProvider, but I have the below error message:

    {"ClassName":"System.Security.Cryptography.CryptographicException","Message":"Object already exists.\r\n",

    {"ClassName":"System.Configuration.ConfigurationErrorsException","Message":"An error occurred executing the configuration section handler for connectionStrings.","Data":null,"InnerException":{"ClassName":"System.Configuration.ConfigurationErrorsException","Message":"Failed to encrypt the section 'connectionStrings' using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: Object already exists.\r\n","Data":null,"InnerException":{"ClassName":"System.Security.Cryptography.CryptographicException","Message":"Object already exists.\r\n","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at

    If I run as an administrator, then it works fine either right clicking on Visual Studio 2019 or right click on the actual .exe. 

    Does RSAProtectedConfigurationProvider ONLY work with Admin rights?

    I have admin rights on the box, but I am not the main administrator account. 

    Due to this, do I need to use: DataProtectionConfigurationProvider?

    I am encrypting this via code as well.

    Tuesday, December 10, 2019 10:16 PM

Answers

  • User-1188570427 posted

    I would like to use: RSAProtectedConfigurationProvider, but I have the below error message:

    {"ClassName":"System.Security.Cryptography.CryptographicException","Message":"Object already exists.\r\n",

    {"ClassName":"System.Configuration.ConfigurationErrorsException","Message":"An error occurred executing the configuration section handler for connectionStrings.","Data":null,"InnerException":{"ClassName":"System.Configuration.ConfigurationErrorsException","Message":"Failed to encrypt the section 'connectionStrings' using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: Object already exists.\r\n","Data":null,"InnerException":{"ClassName":"System.Security.Cryptography.CryptographicException","Message":"Object already exists.\r\n","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at

    If I run as an administrator, then it works fine either right clicking on Visual Studio 2019 or right click on the actual .exe. 

    Does RSAProtectedConfigurationProvider ONLY work with Admin rights?

    I have admin rights on the box, but I am not the main administrator account. 

    Due to this, do I need to use: DataProtectionConfigurationProvider?

    I am encrypting this via code as well.

    RSAProtectedConfigurationProvider will only work with admin rights.

    Appears I will have to use: DataProtectionConfigurationProvider

    I'm just not sure how secure it is now days?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 11, 2019 1:42 AM
  • User-1188570427 posted

    I'm basing that they both give the same security via this post:

    https://stackoverflow.com/questions/6881697/rsaprotectedconfigurationprovider-vs-dataprotectionconfigurationprovider

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 11, 2019 1:44 AM

All replies

  • User-1188570427 posted

    I would like to use: RSAProtectedConfigurationProvider, but I have the below error message:

    {"ClassName":"System.Security.Cryptography.CryptographicException","Message":"Object already exists.\r\n",

    {"ClassName":"System.Configuration.ConfigurationErrorsException","Message":"An error occurred executing the configuration section handler for connectionStrings.","Data":null,"InnerException":{"ClassName":"System.Configuration.ConfigurationErrorsException","Message":"Failed to encrypt the section 'connectionStrings' using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: Object already exists.\r\n","Data":null,"InnerException":{"ClassName":"System.Security.Cryptography.CryptographicException","Message":"Object already exists.\r\n","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at

    If I run as an administrator, then it works fine either right clicking on Visual Studio 2019 or right click on the actual .exe. 

    Does RSAProtectedConfigurationProvider ONLY work with Admin rights?

    I have admin rights on the box, but I am not the main administrator account. 

    Due to this, do I need to use: DataProtectionConfigurationProvider?

    I am encrypting this via code as well.

    RSAProtectedConfigurationProvider will only work with admin rights.

    Appears I will have to use: DataProtectionConfigurationProvider

    I'm just not sure how secure it is now days?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 11, 2019 1:42 AM
  • User-1188570427 posted

    I'm basing that they both give the same security via this post:

    https://stackoverflow.com/questions/6881697/rsaprotectedconfigurationprovider-vs-dataprotectionconfigurationprovider

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 11, 2019 1:44 AM