locked
encrypted connection string RRS feed

  • Question

  • User-596502440 posted

    Encryption error

    a few seconds ago|LINK|157.83.125.12

    <div>

    Hi Expert 

    I am facing error web config files#

    when i have 2 connectionstring in webconfig files

    Line 120:  <encryptionConfiguration configProtectionProvider="DataProtectionConfigurationProvider">
    Line 121:    <EncryptedData>
    Line 122:      <CipherData>
    Line 123:        <CipherValue>AQAAANCMnd8

    </div>

    Roemesh

    Friday, March 12, 2021 7:33 PM

All replies

  • User753101303 posted

    Hi,

    Always tell which error message you have without waiting for someone to ask. It should help to narrow down what happens else we have to guess what could happen among everythign wrong that could happen (and if something rare it will be hard to guess right).

    It happens when deploying your app to another machine? This provider users a key that depends on the user account or on the machine and so my best guess would be that it happens when you try to run this app suing another machine or another account than yours.

    Saturday, March 13, 2021 12:01 PM
  • User-596502440 posted

    i have used this command

    aspnet_regiis.exe -pd "connectionStrings" -app “/DemoApplication”

    but error message

    error message Failed to decrypt using provider 'DataProtectionConfigurationProvider'. Error message from the provider: Key not valid for use in specified state. (Exception from HRESULT: 0x8009000B)

    Saturday, March 13, 2021 7:41 PM
  • User503812343 posted

    Are you trying to use web.config encrypted in one machine and using it in another machine?

    Encryption is machine-specific so if you encrypt a connection string on one machine and deploy code to other machines. Encryption is not going to work.

    Monday, March 15, 2021 2:23 PM