Trying to shift focus a bit based on initial feedback on the question.
In a DevOps release pipeline, using Manage IIS Website task, trying to add an https binding using a wildcard certificate. The certificate is in the local computer's certificate store (checked with mmc -> add snap-in "Certificates", select "Computer account" and "Local computer"), in the folder "Web Hosting\Certificates". I think this is where they end up when added from within IIS.
But when running the pipeline, it fails, with this entry in the log:
SSL Certificate add failed, Error: 1312
A specified logon session does not exist. It may already have been terminated.
The actual command line issued by the task is (anonymized by me):
"netsh" http add sslcert hostnameport=www.mydomain.se:443 certhash=*** appid={xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} certstorename=MY
As indicated in a comment, the certstorename
param should apparently be assigned a different value. Fine.
But the task properties page offers no setting for this parameter, so how do I change it? And what should I shange it to?
If it can't be changed in the task, where should I move the cert to enable the task to find it with the value certstorename=MY
? I have tried to find and understand docs about this, but failed, probably due to lacking basic knowledge about certificate stores in general and the associated terminology.