advapi
advapi

Reputation: 3907

MSBuild WebDeploy error when deploying to a virtual directory

I'm a newbie to TFS Deployment, I'm facing a strange issue when I try to deploy to a website in the form ABC\SomeVirtual

The error code is

Deployment on one or more machines failed. System.Exception: ERROR ( message:Can not set attribute "name" to value "ABC\SomeVirtual".. Reason: Invalid site name . )

enter image description here

If I put a site name without '\' it works...

I've tried either to put in the form ABC/SomeVirtual but nothing works... any suggestion?

Upvotes: 0

Views: 580

Answers (1)

Andy Li-MSFT
Andy Li-MSFT

Reputation: 30362

Seems you are using TFS 2015, in TFS 2015 IIS Web App Management task can only create website name, it cannot create the virtual application name. So you cannot use '\' or '/' to create the virtual application name using this task.

Generally, if the website is not exist, then you can use IIS Web App Management task to create the website first, then use IIS Web App Deployment task to deploy to the website or virtual Application like Site/Application...

If the parent website already exist, then you can directly use IIS Web App Deployment task to deploy the virtual application, IIS Web App Management task is not necessary.

For example:

To create an application named Site/Application (Test0906/0928 in below sample), you need to make sure the Site (Test0926 in below sample) already exist there... Reference below screenshot:

enter image description here

Upvotes: 1

Related Questions