I was wondering if someone could help. I have a scenario where I am
trying to set up multiple host headers on a web site using ADSI. Ex: I
have a site called www.testsite.com to which I want to assign three
host headers like (testsite.com, 123.testsite.com, and testsite). My
script creates the site and sets several properties just fine.
However, when I check the host headers, there is only one entry with
all the three host headers I specified as a concatenated string and
delimited with a comma.
I would appreciate any help.
Thanks,
Max.
Here is the code I use to setup the ServerBindings for the site. By
the way, this is the same script from IISFaq.com by Chris Crowe:
HostNames = Split("testsite.com,123.testsite.com,testsite", ",")
IpAddress = 199.12.1.50
Port = 80
redim NewBindings (ubound(HostNames))
For HostNameINdex = 0 To UBound(HostNames)
BindingString = IpAddress & ":" & PortNum &
":"&HostNames(HostNameIndex)
NewBindings(HostNameINdex) = BindingString
next
'Set the server bindings by passing it the NewBindings array.
NewWebServer.ServerBindings = NewBindings