在过去的几天里,我试图将我的包部署到 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" />
有用!那么,为了在站点下创建新目录,我需要做一些魔术吗?