Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It is possible. There are APIs to do it (look at the <code>System.Security.Cryptography</code> namespace), or from the command line you can use aspnet_regiis:</p> <pre><code>aspnet_regiis -pc -exp : create an exportable key pair aspnet_regiis -px : export an RSA key pair to an XML file aspnet_regiis -pi : import an RSA key pair from an XML file aspnet_regiis -pa : add access for an account to a key container </code></pre> <p>Of course, when using encryption, you are simply substituting the problem of protecting data (your connection string) by a problem of protecting the key. </p> <p>In your example, as you are aware since you say you know it's not bulletproof, the user will need to have access to the key container so will be able to decrypt the encrypted connection string. </p> <p>In addition, anyone who gets hold of the XML file containing the exported key pair will be able to do so.</p> <p><strong>UPDATE</strong></p> <p>The deployment procedure would be something like:</p> <ul> <li>Create an exportable key on the developer workstation (aspnet_regiis -pc -exp)</li> <li>Encrypt the configuration section on the developer workstation using this key</li> <li>Export the key to an XML file (aspnet_regiis -px)</li> <li>Copy the XML file to the target machine</li> <li>Import the key from the XML file on the target machine (aspnet_regiis -pi)</li> <li>Give user accounts read access to the key on the target machine (aspnet_regiis -pa)</li> </ul> <p>Sections encrypted using a protected configuration provider such as <code>RSAProtectedConfigurationProvider</code> will be decrypted automatically, provided the Windows identity under which the application is running has read permission for the RSA key container.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload