tags:

views:

18

answers:

1

Currently whenever a new subdomain is created for the site, a new host header value needs to be added manually in IIS for it to work (needs to work with and without SSL). Is there a way to set host header value via API so that subdomains can be created without human intervention?

A: 

For IIS 6, WMI will do the trick. Here's an example on Technet/MSDN:

Creating Sites and Virtual Directories, and Setting Properties Using WMI

http://msdn.microsoft.com/en-us/library/ms524913

-Oisin

x0n
Thanks for pointing me in the right direction. Full instructions on how to do this can be found [here](http://www.codeproject.com/KB/aspnet/addhostheader.aspx)
Shagglez