This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
When binding a certificate to an SSL port as detailed in this article, you may run into one of these 2 common errors:
The parameter is incorrect.
SSL Certificate Add Failed, Error: 1312 A specified logon session does not exist. It may have already been terminated.
If you are getting the message that "The parameter is incorrect," the certhash likely contains hidden characters that were inadvertently copied from the certificate's thumbprint. In the above screenshot, note the '?' at the beginning of the certhash which is causing the issue.
If you are getting Error Code 1312, the certificate you are attempting to bind likely does not contain the private key.
If you are getting Error Code 1312, you can determine if the certificate you imported contains the private key by looking at its icon in MMC.
Icon only shows a certificate. The private key needs to be added.
Icon includes a key. While your icon may be slightly different, the presence of a key means the private key is attached.
Solution A (Incorrect Parameter)
Copy the command into notepad
Save As ANSI
Re-open the file
Remove hidden characters
Re-try the command
Solution B (Error 1312)
Create a .pfx file with your certificate and key file using the following command (replace pfx, key, and crt filenames as appropriate):