Exception 0x80070520 when you try to configure SSL certificate for an IIS Web Site

The error text displayed when attempting to configure the binding is

There was an error while performing this operation. Details: A specified logon session does not exist. It may already have been terminated. (Exception from HRESULT: 0x80070520).

An audit failure is also created in the Security event log on the machine (Event ID 5061).

This error is caused as a result of your certificate not being marked exportable. To resolve this, simply reimport the certificate selecting the “Mark this key as exportable” option when importing the certificate:

The binding will now create successfully.

Written on February 24, 2012