我正在尝试将一个站点绑定列表添加到applicationHost.config文件,而不是通过IIS 7.5手动添加每个站点绑定。在applicationHost.config中更新站点绑定
<site name="new_site" id="6">
<application path="/" applicationPool="new_site">
<virtualDirectory path="/" physicalPath="D:\HTTP\wwwroot\newsite" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:80:example.com" />
<binding protocol="http" bindingInformation="*:80:www.example.com" />
<binding protocol="http" bindingInformation="*:80:example2.com" />
<binding protocol="http" bindingInformation="*:80:www.example2.com" />
</bindings>
</site>
这样做的原因这是我2000和绑定的增加,这将是一个更容易做,如果我可以直接编辑配置文件。
编辑配置文件时,绑定不起作用或在IIS中显示。
这实际上是可能的还是我错过了什么?