1

在过去的几天里,我试图将我的包部署到 IIS 7,但我一无所获。每当我尝试发布包时,我都会收到一条错误消息,指出目标文件夹不存在 - 但实际上它是在远程服务器上创建的,但它是空的(只是文件夹结构):/

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

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" />

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

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

4

1 回答 1

0

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

诀窍是将站点池的身份更改为本地系统。

于 2011-10-28T05:20:25.813 回答