Import a Certificate with Private Key for use in ASP or ASP.NET

Question:

How do I import a certificate with private key for use in ASP or ASP.NET?

Answer:

  1. You need to import from a .pfx or .p12 file. First obtain this file. It could be that your certificate has already been imported into your "current user" certificate store. If so, open the MMC for your current user certificates and export the cert to a .pfx. To open the MMC for the current-user certificate store, see this page: manageUserCerts.html
  2. When exporting a .pfx from the current-user certificate store, click "Yes, export the private key". Include all the certificates in the path if possible, and do not delete the private key. Do not enable strong private key protection. The password you select when exporting will be needed when importing the PFX in the next step.
  3. Now that you have a PFX file, open the MMC for managing the computer certificates: ManageSystemCerts.html .
  4. Choose the menu item "Action / All Tasks / Import".
  5. Find your PFX file, select it, and type in the password you used when exporting the PFX.
  6. Make sure to mark the key as exportable.
  7. Let the wizard automatically select the certificate store.
  8. Click "Finish" and the certificate should be imported and ready for use.
  9. Run this ASP script to see if it worked. Find ASP Certificates
  10. or... Run this ASP.NET script to see if it worked: Find ASP.NET Certificates