2

We are upgrading the server from Windows 2003 to 2008. As part of the process, I need to configure a port with a SSL certificate. When I ran the following command:

netsh http add sslcert ipport=1.2.3.4:8000 certhash=certificatehash appid={someGUID}

I got the following error:

SSL Certificate add failed, Error: 1312 A specified logon session does not exist. It may already have been terminated.

When running the command prompt with an administrator does not resolve the issue. Notice that I did not run into this issue on Windows 2003 (using httpcfg) and that things work well there.

Has anyone encountered this issue? Thanks.

1

2 Answers 2

1

the 1312 shows up at several occasions. aside from typos on the commandline, the other most common are: - the certificate is not in your certificate store at all (check with MMC and 'certificates' snap-in) - the certificate is in the wrong store: it should be in the store of 'local computer' not 'local user' (remember to choose proper account when activating the snapin inside the MMC) - the certificate doesnt contain a Private Key (open the certificate and check whether it contains only public, or both keys)

I've spent over 1.5 hours before I found out that I've had generated a certificate succesfully, but misplaced some switches and it got written to a file without the private key:)

0

Are you running from an elevated command prompt (not just as an admin)?. There's an open source GUI tool that drives the HTTP config APIs directly- I use it on 2008 R2 with no trouble (it auto-requests elevation via UAC). I've had mixed results with netsh/httpcfg. This one always works for me (and it behaves the same everywhere).

Not the answer you're looking for? Browse other questions tagged or ask your own question.