Iis 7 IIS 7 Web部署无法处理创建子文件夹?

Iis 7 IIS 7 Web部署无法处理创建子文件夹?,iis-7,msdeploy,virtual-directory,microsoft-web-deploy,Iis 7,Msdeploy,Virtual Directory,Microsoft Web Deploy,在过去的几天里,我试图将我的包部署到IIS7,但我一无所获。 每当我尝试发布包时,我都会收到一个错误,说明目标文件夹不存在,但实际上它是在远程服务器上创建的,但仅在文件夹结构中为空:/ 我正在使用以下命令构建包: msbuild.exe /t:CreateWebPackages /toolsversion:4.0 CRM.msbuild 并尝试通过以下方式部署它: CRM.cmd /M:server /Y 结果是: C:\...WebService.deploy.cmd /M:crm

在过去的几天里,我试图将我的包部署到IIS7,但我一无所获。 每当我尝试发布包时,我都会收到一个错误,说明目标文件夹不存在,但实际上它是在远程服务器上创建的,但仅在文件夹结构中为空:/

我正在使用以下命令构建包:

msbuild.exe /t:CreateWebPackages /toolsversion:4.0 CRM.msbuild
并尝试通过以下方式部署它:

CRM.cmd /M:server /Y
结果是:

    C:\...WebService.deploy.cmd /M:crm-web /y
    =========================================================
    SetParameters from:
    "C:...WebService.SetParameters.xml"
    You can change IIS Application Name, Physical path, connectionString
    or other deploy parameters in the above file.
    -------------------------------------------------------
     Start executing msdeploy.exe
    -------------------------------------------------------
     "C:\Program Files\IIS\Microsoft Web Deploy\\msdeploy.exe" 
-source:package='C:...WebService.zip' -dest:auto,computerName='crm-w
    eb-new',includeAcls='False' -verb:sync -disableLink:AppPoolExtension -disableLin
    k:ContentExtension -disableLink:CertificateExtension 
-setParamFile:"C:...WebService.SetParameters.xml"
    Info: Adding sitemanifest (sitemanifest).
    Info: Updating createApp (Kruk CRM Web Service/2.0.65000.65000).
    Info: Adding contentPath (Kruk CRM Web Service/2.0.65000.65000).
    Info: Adding dirPath (Kruk CRM Web Service/2.0.65000.65000).
    Info: Adding child dirPath (Kruk CRM Web Service/2.0.65000.65000\bin).
    Info: Adding setAcl (Kruk CRM Web Service/2.0.65000.65000).
    Error: (2011-10-27 11:07:59) An error occurred when the request was processed on
     the remote computer.
    Error: Could not find file '\\?\C:\inetpub\wwwroot\CRM\2.0.65000.65000'.
    Error count: 1.
但是当我编辑SetParameters.xml文件并更改

<setParameter name="IIS Web Application Name" value="Web Service/2.0.65000.65000" />

它起作用了!
那么,为了在站点下创建新目录,我需要做些什么魔术吗?

找到了!在试用了几乎所有可用的msbuild、msdeploy、项目设置、IIS等选项之后,我注意到msdeploy无法在站点的应用程序池下创建我的应用程序,因为它的标识显然没有足够高的权限来创建

诀窍在于将站点池的标识更改为本地系统

<setParameter name="IIS Web Application Name" value="Web Service" />