title: How can i encrypt a web.config variable in c#
body: <p>I have to put a password in my web.config and i need to encrypt it and use in my code, is there some tip to how to do this?</p>
  
  <p>Code of my web.config:</p>
  
  <pre><code>&lt;appSettings&gt;
      &lt;add key="Password" value="test123"/&gt;
  &lt;/appSettings&gt;
  </code></pre>
  
  <p>How im getting it:</p>
  
  <pre><code>string Password = ConfigurationManager.AppSettings["Password"];
  </code></pre>
  
  <p>Thanks!</p>