Wednesday, June 3, 2015

SSL cert binding in IIS 7.5

Trying to add an SSL Binding in IIS 7.5 with the GUI and realized that there is a bug in the process.
If you use the GUI the cert will be installed incorrectly. Use the following command lines to install your cert correctly.



Run the following commands from the C:\Windows\System32\inetsrv directory:
1. Open powershell as admin

2. Open netsh shell and Issue http verb
• Netsh
• http
• nesh http> add sslcert ipport=XXX.XXX.XXX.171:443 appid={4dc3e181-e14b-4a21-b022-59fc669b0914} certhash=69c04af8588ec65762de96ddd51d78fa6e47c692 certstorename=MY


3. Appcmd set site /site.name:”<SITE_NAME>” /+”bindings.[protocol=’https’,bindingInformation=’<IP_ADDRESS>:443:<HOST_NAME>’]”

Error:
Cannot find site object with the identifier bindingInformation

Fix:
Add double quotes around the bindings command

  ./appcmd set site /site.name:update.com  /+"bindings.[protocol='https',bindingInformation='XXX.XXX.XXX.171:443:update.com']"

Source:
  1. Netsh
  2. AppCmd
  3. http://stackoverflow.com/questions/9616722/error-using-appcmd-to-add-ssl-binding
  4. http://stackoverflow.com/questions/779228/the-parameter-is-incorrect-error-using-netsh-http-add-sslcert

No comments:

Post a Comment