D
Derek
I'm trying to setup encryption using machine level RSA for a web farm and
having issues. I followed the instructions on MSDN article but when I import
run app on another machine the error I get the following error
Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error
message from the provider: Bad Data.
Most of my searching seemed to point to ACLS on key but I dont think this is
the case as I can take a unecrypted web.config and encrypt and run on each of
the machines with no issues but if I take a encrypted config from machine A
and run on machine B I get the error above.
Also I going from a Windows 2003 to Windows 2000 Server box. I granted
permissions to NT Authority\Network Service on 2k3 box and ASPNET on 2K box.
Here's unecrypted config snippet
<configProtectedData>
<providers>
<add keyContainerName="MyKeys" useMachineContainer="true"
description="Uses RsaCryptoServiceProvider to encrypt and decrypt"
name="CustomProvider"
type="System.Configuration.RsaProtectedConfigurationProvider,System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</configProtectedData>
<connectionStrings>
<add name="Test"
connectionString="Database=testdbname;Server=TestServerName;User=myuserid;Passwor=mypassword;"
providerName="System.Data.SqlClient" />
</connectionStrings>
having issues. I followed the instructions on MSDN article but when I import
run app on another machine the error I get the following error
Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error
message from the provider: Bad Data.
Most of my searching seemed to point to ACLS on key but I dont think this is
the case as I can take a unecrypted web.config and encrypt and run on each of
the machines with no issues but if I take a encrypted config from machine A
and run on machine B I get the error above.
Also I going from a Windows 2003 to Windows 2000 Server box. I granted
permissions to NT Authority\Network Service on 2k3 box and ASPNET on 2K box.
Here's unecrypted config snippet
<configProtectedData>
<providers>
<add keyContainerName="MyKeys" useMachineContainer="true"
description="Uses RsaCryptoServiceProvider to encrypt and decrypt"
name="CustomProvider"
type="System.Configuration.RsaProtectedConfigurationProvider,System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</configProtectedData>
<connectionStrings>
<add name="Test"
connectionString="Database=testdbname;Server=TestServerName;User=myuserid;Passwor=mypassword;"
providerName="System.Data.SqlClient" />
</connectionStrings>