八达通嵌套虚拟目录创建问题

时间:2016-08-03 18:08:43

标签: powershell iis continuous-integration octopus-deploy

我需要创建以下IIS结构

Default Website
-Folder1
--Folder2
---Virtual

我尝试使用IIS Virtual Directory - Create,我有以下设置

Virtual path: Folder1/Folder2/Virtual
Parent site: Default Website

部署时,出现以下错误:

10:48:10   Verbose  |       PSVersion                      4.0
10:48:10   Verbose  |       WSManStackVersion              3.0
10:48:10   Verbose  |       SerializationVersion           1.1.0.1
10:48:10   Verbose  |       CLRVersion                     4.0.30319.34209
10:48:10   Verbose  |       BuildVersion                   6.3.9600.17400
10:48:10   Verbose  |       PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
10:48:10   Verbose  |       PSRemotingProtocolVersion      2.2
10:48:10   Info     |       Virtual path: Folder1/Folder2/Virtual
10:48:10   Info     |       Parent site: Default Website
10:48:10   Info     |       Getting web site Default Website
10:48:10   Info     |       Ensuring parent exists: Folder1
10:48:10   Error    |       The application or virtual directory 'Folder1' does not exist
10:48:10   Error    |       At C:\Octopus\Work\20160803174807-1279\Script.ps1:99 char:17
10:48:10   Error    |       +                 throw "The application or virtual directory '$name' does not exi ...

Folder1和Folder2存在,但它们不是虚拟的。 PS脚本似乎只检查虚拟父文件夹,但它不应该,因为IIS允许在其他常规文件夹中创建虚拟文件夹。

我还尝试将设置更改为:

Virtual path: Virtual
Parent site: Default Website/Folder1/Folder2/

但没有成功......任何想法?

0 个答案:

没有答案