Azure部署Web错误

时间:2011-09-29 03:11:03

标签: azure webdeploy

我正在尝试使用this method将我的网络应用部署到Azure,但是我会定期收到此错误消息。有任何想法吗?我重新启动了实例,但仍然发生了。

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 ==========

1 个答案:

答案 0 :(得分:0)

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

然后使用csdef文件中的选项将实际Web项目创建为单独的站点。完成此操作后,您可以使用Web部署部署任何站点,只要他们没有引用您的bootstrap dll(因为他们不会复制该文件),它们就可以正常工作。