简体   繁体   中英

TFS 2017 Release definition. WinRM - IIS Web App Management task. Create application under “Default web site”

I am working on a release definition which will deploy a website to a test IIS server (Windows server 2012, IIS 8).

I would like to use the IIS Web App Management task to create and configure an application or virtual directory under "Default Web Site/Scott"

When I specify "Default Web Site/Scott" or "Default Web Site\\Scott" as the Website, the task fails due to the name attribute.

The Scott application will be created alongside many existing applications underneath the Default Web Site parent. I don't mind if it shares the app pool.

Can I use the WinRM task? If not, are there any alternatives apart from writing Powershell?

In the WinRM - IIS Web App Management task, there is also a Parameters for IIS Application configuration you could simply configure to deploy the IIS Web Applications. However this is not available wit TFS for now:

The Visual Studio Team Services accounts that are using the preview tasks wiz. IIS Web Application Deployment or SQL Server Database Deployment , should move to this extension. All future enhancements to the IIS Web App Deployment task or to the SQL Server Database Deployment task will be provided in this extension.

Source Link

For now you have to directly deploy a Web Application to the IIS Server with IIS Web App Deploy task which using Web Deploy. You could add a environment variable IIS Web Application Name and use this as the website name, such as:

在此输入图像描述

The “ IIS Web Application Name ” parameter is the IIS path where you want to deploy your web application. This can include a value such as Default Web Site/Contoso.web_deploy , this is specified in the Deploy IIS App task under Deployment | Website Name .

For more detail steps, you could take a look at below two nice blogs:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM