title: Private keys get deleted unexpectedly in Windows Server 2008 R2
body: <p>I am facing a strange problem in developing an installation that should in one of the steps install a certificate.</p>
  
  <p>The problem has to do with granting Certificate’s private key access for an account (e.g. IIS_IUSRS) on Windows Server 2008 R2. The private keys are stored in the location C:\Users\All Users\Microsoft\Crypto\RSA\MachineKeys.</p>
  
  <p>A custom C# Setup Project imports a Certificate and gives access for an account on Certificate’s private key during the installation process. After some time (2-3 sec) the private key file is automatically deleted from the MachineKeys folder. Thus the installed Web Application cannot access the specific certificate and displays the following error message:</p>
  
  <p>“System.Security.Cryptography.CryptographicException: Keyset does not exist”. This error occurs only on Windows Server 2008 R2, while for Windows Server 2003 everything is working correctly.</p>
  
  <p>My question is, why the private key gets deleted and which process does this?</p>
  
  <p>Thx</p>
  
  <p><strong>UPDATE 17/05/2012</strong></p>
  
  <p>I have not yet found a solution to the described problem, and no response has been posted on the other forums where I asked (forums.asp.net, social.msdn.microsoft.com). So, can anyone suggest any other resources or advice for further troubleshooting this issue?</p>
  
  <p>Thanks again</p>