Question

I am trying to give an app https bindings using one of the available certificates in IIS7 but am struggling with the syntax.

I think the command should look something like the following but it does not work:

appcmd.exe set site "mysite.com" /+bindings.[protocol='https',bindingInformation='*:443:www.mysite.local:mycertificatename']
Was it helpful?

Solution

The best way I have found is to use selfssl.exe

C:\Program Files (x86)\IIS Resources\SelfSSL>selfssl.exe /T /N:CN=mysite.com /S:theSiteId /Q

I haven't found a way to do it with appcmd. The problem with this solution is it means that you have to have IIS resource kit installed on the server. Personally I think you would better off installing powershell or ruby on the server.

Depends on your ops guys I guess.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top