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" />
It looks like you need to have your RSA key installed on the server. See this knowledgebase article for full details: http://kb.discountasp.net/article.aspx?id=10478 Aristotle DiscountASP.NET www.DiscountASP.NET
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>
Value of the keyContainerName should be 'NetFrameworkConfigurationKey_XXXXX where XXXXX is your DASP username (same as what you specified while generating your pair of RSA keys [http://kb.discountasp.net/article.aspx?id=10477]) Vikram DiscountASP.NET www.DiscountASP.NET