locked
Binding an existing certificate to "default web site" with appcmd RRS feed

  • Question

  • 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

    Tuesday, June 9, 2009 7:01 AM

Answers

  • User690216013 posted

    If you want to bind certificate to site via appcmd, you can refer to this article.

    http://learn.iis.net/page.aspx/144/how-to-setup-ssl-on-iis-70/

    http://stackoverflow.com/questions/591597/can-you-use-appcmd-to-assign-a-ssl-certificate-to-iis7-site

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Tuesday, June 9, 2009 7:23 AM

All replies

  • User690216013 posted

    If you want to bind certificate to site via appcmd, you can refer to this article.

    http://learn.iis.net/page.aspx/144/how-to-setup-ssl-on-iis-70/

    http://stackoverflow.com/questions/591597/can-you-use-appcmd-to-assign-a-ssl-certificate-to-iis7-site

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Tuesday, June 9, 2009 7:23 AM
  • User-1694598626 posted

    Thanks lextm!

    I've tried the first article but not the second. I will check that second article and try it out.

    It worked! Thanks a million lextm \o/

    -christerb 

    Tuesday, June 9, 2009 7:32 AM