After I encrypt my Connection strings and upload the files I am getting error

Discussion in 'ASP.NET 2.0' started by sridhar.a, May 8, 2007.

  1. Hi,
    I encrypted my web.config and I uploaded the data to ftp site. I am getting the below error
    do I have to do any thing else.
    please let me know

    Sridhar

    Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: The RSA key container could not be opened.

    Source Error:






    Code:
    Line 14: 	</configSections>
    Line 15: 	<connectionStrings configProtectionProvider="RsaProtectedConfigurationProvider">
    Line 16:   <EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element"
    Line 17:    xmlns="http://www.w3.org/2001/04/xmlenc#">
    Line 18:    <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />
     
  2. Hi,
    as per the instructions mentioned in the url mentioned, I have created
    NetFrameworkConfigurationKey_username.xml

    In the document its given like this

    Then add the custom configProtectedData provider in your application's web.config. Replace the keyContainerName value with the same container name of your RSA key.







    <configuration>
    <configProtectedData defaultProvider="MyRsaProtectedConfigurationProvider">
    <providers>
    <add name="MyRsaProtectedConfigurationProvider"
    type="System.Configuration.RsaProtectedConfigurationProvider, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
    keyContainerName="NetFrameworkConfigurationKey_username" --??
    useMachineContainer="true" />
    </providers>
    </configProtectedData>
    </configuration>

     

Share This Page