title: Why can I encrypt a web.config but not decrypt it on the same box? Error is The parameter is incorrect
body: <p>I'm getting an error where I'm able to encrypt a web.config file but not decrypt it. For example, I have my clear text connection strings inside web.config and I encrypt it with this command:</p>
  <pre><code>C:\Windows\Microsoft.NET\Framework\v4.0.30319&gt;aspnet_regiis -pef &quot;connectionStrings&quot; c:\inetpub\wwwroot\App
  Microsoft (R) ASP.NET RegIIS version 4.0.30319.0
  Administration utility to install and uninstall ASP.NET on the local machine.
  Copyright (C) Microsoft Corporation.  All rights reserved.
  Encrypting configuration section...
  Succeeded!
  </code></pre>
  <p>When I immediately try to decrypt it, I get this error:</p>
  <pre><code>C:\Windows\Microsoft.NET\Framework\v4.0.30319&gt;aspnet_regiis -pdf &quot;connectionStrings&quot; c:\inetpub\wwwroot\App
  Microsoft (R) ASP.NET RegIIS version 4.0.30319.0
  Administration utility to install and uninstall ASP.NET on the local machine.
  Copyright (C) Microsoft Corporation.  All rights reserved.
  Decrypting configuration section...
  Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: The parameter is incorrect.
   (c:\inetpub\wwwroot\IdentityManager\web.config line 9)
  
  The parameter is incorrect.
  
  Failed!
  </code></pre>
  <p>I tried deleting and recreating the RSA keys, but this did not work either:</p>
  <pre><code>aspnet_regiis -pz &quot;NetFrameworkConfigurationKey&quot;
  
  aspnet_regiis -pc &quot;NetFrameworkConfigurationKey&quot;
  </code></pre>
  <p>I'm not sure why I can encrypt successfully and not decrypt. To me, RSA is symmetric.</p>
  <p>I am a local administrator on the box.</p>