Azure 的 Web 部署错误 [英] Web Deploy Error with Azure

查看:33
本文介绍了Azure 的 Web 部署错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 此方法,但我会定期收到此错误.有任何想法吗?我重新启动了实例,仍然发生.

I'm trying to deploy my web app to Azure using this method, but periodically, i get this error. Any ideas? I rebooted the instance, still happens.

Start Web Deploy Publish the Application/package to https://xxx.cloudapp.net:8172/MsDeploy.axd?site=myapp.Web_IN_0_myapp.Web ...
Updating setAcl (myapp.Web_IN_0_myapp.Web).
Updating setAcl (myapp.Web_IN_0_myapp.Web).
Updating filePath (myapp.Web_IN_0_myapp.Web\bin\myapp.Web.dll).
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Warning : An error was encountered when processing operation 'Create File' on 'myapp.Web.dll'.  
Retrying operation 'Update' on object filePath (myapp.Web_IN_0_myapp.Web\bin\myapp.Web.dll). Attempt 1 of 2.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Warning : An error was encountered when processing operation 'Create File' on 'myapp.Web.dll'.  
Retrying operation 'Update' on object filePath (myapp.Web_IN_0_myapp.Web\bin\myapp.Web.dll). Attempt 2 of 2.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Error : Web deployment task failed.((9/28/2011 8:00:56 PM) An error occurred when the request was processed on the remote computer.)

(9/28/2011 8:00:56 PM) An error occurred when the request was processed on the remote computer.
An error was encountered when processing operation 'Create File' on 'myapp.Web.dll'.
The error code was 0x80070020.
The process cannot access 'E:\approot\bin\myapp.Web.dll' because it is being used by another process.
Publish failed to deploy.
========== Build: 3 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

推荐答案

答案是为您的 Web 角色创建一个引导程序 csproj,它什么都不做.这将是被 WaIISHost 锁定的 DLL.

The answer is to create a bootstrap csproj for your web role, that does nothing. This will be the DLL that gets locked by WaIISHost.

然后使用 csdef 文件中的选项将真实的 Web 项目创建为单独的站点.完成此操作后,您可以使用 web deploy 部署您的任何站点,只要它们不引用您的引导程序 dll(因为它们不会复制该文件)

Then create the real web projects as separate sites using the option in the csdef file. Once you've done this, you can deploy any of your sites using web deploy and they will work, as long as they have no reference to your bootstrap dll (since they won't copy that file)

这篇关于Azure 的 Web 部署错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆