We're not sure of the exact steps for creating this error, but If you have Windows Server 2012 R2 and are using IIS to export/import certificates around, you might eventually see then when trying to use the certificate:
A specified logon session does not exist. It may already have been terminated. (Exception from HRESULT: 0x80070520)
Our workaround for this issue is to use the traditional mmc.exe
for export/import. Steps to use the MMC GUI rather than IIS:
- Click Start, and then click Run.
- Type
MMC.EXE
and click OK. - Click Console in the new MMC you created, and then click Add/Remove Snap-in.
- In the new window, click Add.
- Highlight the Certificates snap-in, and then click Add.
- Choose the Computer option and click Next.
- Select Local Computer on the next screen, and then click OK.
- Click Close, and then click OK.
- You have now added the Certificates snap-in, which will allow you to work with any certificates in your computer's certificate store. You may want to save this MMC for later use.