简体   繁体   English

如何使用 tfs 发布管理客户端在 IIS 中设置网站/Web 应用程序的主机名?

[英]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.

相关问题 TFS 2017版本定义。 WinRM - IIS Web App管理任务。 在“默认网站”下创建应用程序 - TFS 2017 Release definition. WinRM - IIS Web App Management task. Create application under “Default web site” 网站作为IIS 7中的应用程序 - web site as application in IIS 7 如何将新的Web应用程序部署到IIS站点的子目录中,而不必单击“转换为应用程序”? - How can I deploy a new web application to a subdirectory of an IIS site and not have to click “Convert To Application”? 如何将应用程序添加到IIS 7中的默认网站? - How do I add an application to Default Web Site in IIS 7? 如何在IIS中为Web应用程序使用主机头? - How to use host headers in IIS for a web application? 如何将 SQL 数据库连接到 web 上的 IIS 的网站托管站点? - How can I connect a SQL database to a webhosted site with IIS on the web? 在IIS 6中,一个网站可以从另一个网站读取应用程序级变量吗? COM +呢? - In IIS 6, can one web site read an application-level variable from another web site? How about COM+? 使用iis Express在虚拟主机上访问Web应用程序 - host access to web application on virtual using iis express 如何获取Web应用程序的站点名称? - How to get the site name of a web application? 如何使用版本管理删除\\添加更改Web.Config标记? - How Can I Use Release Management To Remove \ Add Change Web.Config Tags?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM