Reputation: 1522
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?
Upvotes: 2
Views: 613
Reputation: 1542
Check this blogpost: Creating a new website programmatically on IIS using ASP.NET and C#
Upvotes: 1
Reputation: 52420
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
-Oisin
Upvotes: 0