3

I am trying to set SSL Host Headers and Secure Site Bindings in IIS7. I followed the directions on this website http://www.digicert.com/ssl-support/ssl-host-headers-iis-7.htm (among others), but when I run the appcmd command mentioned, I get the error "Object 'SET' is not supported. Run 'appcmd.exe /?' to display supported objects". I have also tryed "appcmd site set" but it still returns the same error. What am I doing wrong?

The server I am working on is Windows 2008 R2 x64, if that matters.

Thank you.

3
  • @RHPT: can you add the actual command line you are using (anonymizing it as necessary). That would be helpful in debugging the problem.
    – MattB
    Apr 16, 2010 at 14:10
  • Sure, here you go appcmd set site /site.name:"Name of Website in IIS" /+bindings.[protocol='https',bindingInformation='*:443:Host Header']
    – RHPT
    Apr 18, 2010 at 3:05
  • That looks like the example text, not the actual command you are using. (It shouldn't make a difference, but it could.)
    – MattB
    Apr 19, 2010 at 13:08

1 Answer 1

3

You get the error "Object 'SET' is not supported" because the you are using appcmd site set. i.e. the "site and set" parameters are the wrong way around. The following command should work:

appcmd set site /site.name: "Name of Site" /+bindings.protocol='https',bindingInformation='*:443:NewHostHeader']

Also, to modify and existing host header you are do:

appcmd set site /site.name: "Name of Site" /bindings.[protocol='http',bindingInformation='*:80:OldHostHeader'].bindingInformation:*:80:NewHostHeader

AppCmd.exe is located in the %systemroot%\system32\inetsrv\ directory. And is available for IIS 7.0 and later.

1
  • APPCMD SITE SET is syntax supported by APPCMDUI, but not by APPCMD itself. APPCMDUI magically reorders parameters to make them work with intellisense-like behaviour, then fixes them before running them.
    – TristanK
    Oct 21, 2011 at 0:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .