Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error using appcmd to add ssl binding

I want to add a binding to a site using appcmd. But when I try the following command I get an error:

appcmd set site /site.name:"My site name" /+bindings.[protocol='https',bindingInformation='*:443:sub.mydomain.com'] 

The error:

ERROR ( message:Cannot find SITE object with identifier "bindingInformation='*:443:sub.mydomain.com']". )

I checked if the site exists and it does. What am I doing wrong?

like image 657
Goldhorn Avatar asked Mar 08 '12 11:03

Goldhorn


2 Answers

If you're using PowerShell, you have to surround the bindings parameter with double quotes so that PowerShell doesn't interpret the single quotes before the command is sent to appcmd.

./appcmd set site /site.name: contoso /+"bindings.[protocol='https',bindingInformation='*:443:']"

source: http://technet.microsoft.com/en-us/library/cc731692(v=ws.10).aspx

like image 200
northben Avatar answered Sep 21 '22 03:09

northben


Try this:

appcmd set site "My site name" /bindings:"https://sub.mydomain.com:443"

But your command is correct as well. List all websites and make sure you are using one of them:

appcmd list site
like image 31
Tomek Avatar answered Sep 22 '22 03:09

Tomek