Asp.net RSA Machine level encryption.

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top