Keyset does not exist

Discussion in 'Windows / IIS' started by SapphireJim, Feb 6, 2010.

  1. Trying to use WsHttpBinding with Message credential which requires access to the private key of the certificate, I get this error:

    Keyset does not exist

    According to the Microsoft documentation this error is caused by one of two things:

    Cause: Private key access denied.
    Remedy: Grant the account under which ASP.NET is running read permission to the private key.

    Cause: Private key not found.
    Remedy: Make sure the private key for the certificate is installed.

    How can I find out which is the actual cause with my certificate, and take corrective action. AFAIK there is no way for me to accomplish this without the intervention of DiscountAsp.net staff. If I need a new cert, that's okay.
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    are you trying to use your own SSL certificate?
     
  3. I know what to do but it has to be done by discountasp.net

    I now know exactly what to do, but it has to be done by discountasp.net. The basic issue is that the WCF wsHttpBinding with security Mode=Message and MessageClientCredentialType=UserName uses the private key of the certificate even though it isn't running under SSL (there is an exchange of keys that is similar to the SSL sequence but over http). The error is because the application pool identity doesn't have read access to the private key of the certificate.

    The basic steps to correct this are:
    1. Locate the private key of the certificate
    2. Grant read access to the application pool identity that the application is running under.

    There is a little more detail, but I can spell it out step-by-step. What's the protocal - submit a ticket?
     
  4. mjp

    mjp

    See Bruce's question.

    You need to specify what you mean by "the certificate."
     
  5. The SSL certificate for the Web site. It serves a dual purpose under WCF. As I said, I know how to make it accessible to WCF but can't do it myself, so I guess I'll just go ahead and submit a request.
     
  6. Issue resolved

    Just for the record, I submitted a ticket to DiscountAsp.net. It was handled quickly and the issue is resolved. My WCF service is working correctly.

    I must say, I'm pleased and impressed.
     
  7. mjp

    mjp

    Good deal. Glad it worked out for you.
     

Share This Page