title: How do I get FiddlerCore programmatic Certificate Installation to 'stick'?
body: <p>I'm using FiddlerCore to capture HTTP requests. Everything is working including SSL Captures as long as the Fiddler certificate is manually installed. I've been using manual installation through Fiddler's Options menu and that works fine.</p>
  
  <p>However, if I use the FiddlerCore provided <code>CertMaker</code> class static methods to add the Fiddler certificate I find that I can use the certificate added to the cert root <em>only in the current session</em>. As soon as I shut down the application and start back up, <code>CertMaker.rootCertExists()</code> returns false.</p>
  
  <p>I use the following code to install the certificate for the current user (from an explicit menu option at this point):</p>
  
  <pre><code>public static bool InstallCertificate()
  {
      if (!CertMaker.rootCertExists())
      {
          if (!CertMaker.createRootCert())
              return false;
  
          if (!CertMaker.trustRootCert())
              return false;
      }
  
      return true;
  }
  </code></pre>
  
  <p>The cert gets installed and I see it in the root cert store for the current user. If I capture SSL requests in the currently running application it works fine. </p>
  
  <p>However, if I shut down the running exe, restart and call <code>CertMaker.certRootExists()</code> it returns false and if I try to capture SSL requests the SSL connection fails in the browser. If I recreate the cert and then re-run the requests in the browser while the app stays running it works again.  I now end up with two certificates in the root store. </p>
  
  <p>After exiting and relaunching <code>certMaker.certRootExists()</code> again returns false. Only way to get it to work is to register the cert - per exe session.</p>
  
  <p>What am I doing wrong to cause the installation to not stick between execution of the same application?</p>