Unanswered Installing a certificate, deletes the private key

  • Monday, May 07, 2012 12:58 PM
     
     

    I am facing a strange problem in developing an installation that should in one of the steps install a certificate.

    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.

    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:

    “System.Security.Cryptography.CryptographicException: Keyset does not exist”. This error occurs only on Windows Server 2008, while for Windows Server 2003 everything is working correctly.

    My question is, why the private key gets deleted and which process does this?

    Thx

All Replies

  • Tuesday, May 08, 2012 8:25 AM
     
     

    First it is a web app installation product, this ASP.NET forum should be appropriate: http://forums.asp.net/
    Second, if there’s any cert aspect questions, I think the SDK forum would give some helps.

    Best wishes,

     

    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

  • Tuesday, May 08, 2012 12:01 PM
     
     

    Thx.

    The post has been transferred to the following URL: http://forums.asp.net/p/1801423/4970815.aspx/1?p=True&t=634720608308281303

  • Thursday, May 10, 2012 9:07 AM
     
     
    You're welcome.

    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

  • Thursday, May 17, 2012 6:49 AM
     
     

    No answer has been received in this or any of the other suggested forums for our question. Can anyone suggest any other resources or advice for further troubleshooting this issue?

    Thx

  • Thursday, May 17, 2012 10:48 AM
     
     

    I'm afraid that they're the most appropriate forums.

    Best wishes,


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

  • Thursday, May 31, 2012 3:10 AM
    Moderator
     
     
    Do you have Anti-virus software running on the server?  If so, tell it to ignore scanning the directory C:\Users\All Users\Microsoft\Crypto\RSA\MachineKeys

    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer

    Jeff Wharton
    MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCSD, MCITP, MCDBA
    Blog: Mr. Wharty's Ramblings
    Twitter: @Mr_Wharty
    MC ID: Microsoft Transcript