Home > Blockchain >  SSL Certificate add failed,Cannot create a file when that file already exists
SSL Certificate add failed,Cannot create a file when that file already exists

Time:03-24

I have deployed the code to IIS server by using pipelines. But i got an error: enter image description here

Anyone please help me to solve this issue.

when i try to chnage the certificate it is not chnages in the IIS server

CodePudding user response:

You are seeing this error message because there was previously a certificate that was SSL bound to both the IP address and port specified in the SSL binding command. You will first need to run the following command:

netsh http delete sslcert ipport=<IPaddress:portNumber>

When that command runs successfully, you can run the SSL binding command and it will work.

CodePudding user response:

It means that the port has already bounded a certificate. If you want to bound new certificate we need to delete the old one and bound new one.

  1. Check if port has bounded a cert:

    netsh http show sslcert > c:\result.txt

  2. Open the result.txt and search for the port (here port =443)

  3. Delete the old certificate: netsh http delete sslcert ipport=0.0.0.0:443

  4. Bound new certificate

    netsh http add sslcert ipport=0.0.0.0:443 certhash=‎89857a42309423c239f42392384a appid={214124cd-d05b-4309-9af9-13123454a52b}

  • Related