User-1694598626 posted
Hi!
First i was trying to change the existing https binding from one IP to another but that didn't work. Then I tried to add a new https binding with the new IP and delete the old one with appcmd like this:
To remove old bindings:
appcmd set site /site.name:Default Web Site /-bindings.[protocol='https',bindingInformation='my old ip:443:']
To add new bindings:
appcmd set site /site.name:Default Web Site /+bindings.[protocol='https',bindingInformation='my new ip:443:']
That works fine. The problem I have is when I check the bindings, my server certificate is not bound to the new https binding. Then I tried to run:
appcmd set config -section:system.applicationHost/sites /+"[name='Default Web Site'].bindings.[protocol='https',bindingInformation='my new ip:443:']" /commit:apphost
But that don't seem to bind the server certificate either. So what am I doing wrong? Please help me out here.
-christerb