When trying to complete a certificate request in IIS, you may get this error:
There was an error while performing this operation.
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
This happens because the certificate request has already been completed. In other words, the certificate has already been imported (and is probably hiding in another location in the Certificates MMC). To fix this, open the Certificates MMC and hunt around for installations of the certificate, and delete them (hint: Check the Intermediate Certificates folder first). Then open IIS and try again. If you get the error again, hit refresh on the IIS certificates list because it might have worked (I like to export the successful certificate as a PFX file, delete it and import the PFX without errors, at this point).
If that doesn’t fix it, try running IIS as Administrator and confirm that you have file permission to write to C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\.