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

发布于 2024-12-11 22:11:59 字数 2002 浏览 11 评论 0原文

在过去的几天里,我尝试将我的包部署到 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" />

它时,它就可以工作了! 那么我需要做一些魔术才能在网站下创建新目录吗?

For the past few days I'm trying to deploy my package to IIS 7 but I'm getting nowhere.
Whenever I try to publish the package I receive an error saying that the destination folder doesn't exist - but in fact it WAS created on the remote server but was empty (just the folder structure) :/

I'm building my package with a following command:

msbuild.exe /t:CreateWebPackages /toolsversion:4.0 CRM.msbuild

and trying to deploy it with:

CRM.cmd /M:server /Y

Result is:

    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.

But when i edit the SetParameters.xml file and change

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

to

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

it works!
So is there some magic trick that I need to do in order to create new dirs under the site ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

单调的奢华 2024-12-18 22:11:59

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

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

Found it! After experimenting with almost all of the available options of msbuild, msdeploy, project settings, IIS etc, I've noticed that msdeploy couldn't create my application under site's application pool because apparently it's identity had not high enough privileges to do so.

What did the trick was changing the identity of the site pool to Local System.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文