[英]How can I set the host name for a web site/web application in IIS using tfs release management client?
I have to deploy a few sites using TFS Release Management Client, all of them in them same machine so same IIS.我必须使用 TFS Release Management Client 部署几个站点,所有站点都在同一台机器上,因此 IIS 相同。 They will be all on port 80 but the requests are served for different host names (domains).它们都在端口 80 上,但请求是针对不同的主机名(域)提供的。
Using IISConfig tool, it is possible to change the port but not the host name, do you know a quick way already implemented to achieve that without creating a custom tool?使用 IISConfig 工具,可以更改端口而不是主机名,您是否知道一种已经实现的快速方法来实现这一点,而无需创建自定义工具?
As confirmed here , it is not possible but if you scroll down there is a suggestion how to quickly work around the limitation.正如此处确认的那样,这是不可能的,但是如果您向下滚动,则会提供如何快速解决限制的建议。 Creating 2 actions创建 2 个动作
-Command "& { Import-Module WebAdministration; New-WebBinding -Name '__Name__' -IPAddress '__IPAddress__' -Port '__Port__' -HostHeader '__HostHeader__' }"
and和
-Command "& { Import-Module WebAdministration; Remove-WebBinding -Name '__Name__' -IPAddress '__IPAddress__' -Port '__Port__' -HostHeader '__HostHeader__' } "
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.