【问题标题】:Web Deploy Error with AzureAzure 的 Web 部署错误
【发布时间】:2011-11-27 08:50:27
【问题描述】:

我正在尝试使用 this method 将我的 Web 应用程序部署到 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 ==========

【问题讨论】:

  • WaIISHost.exe 似乎已将其锁定。这个 dll 似乎是定义为 Web Role EntryPoint 的那个。如果我手动杀死 WaIISHost.exe,在 WaIISHost 自动重新启动之前,我似乎有大约一分钟的时间来复制 dll。我试图将入口点移动到另一个 DLL 中,但它并没有上当。

标签: azure webdeploy


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-12-05
    • 1970-01-01
    • 1970-01-01
    • 2016-11-11
    • 2015-01-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多