2011-09-29 114 views
0

我試圖使用this method將我的網絡應用部署到Azure,但是週期性地出現此錯誤。有任何想法嗎?我重新啓動實例,仍然發生。使用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 ========== 
+0

WaIISHost.exe似乎鎖定它。這個DLL似乎是定義爲Web角色入口點的那個。如果我手動殺死WaiISHost.exe,我似乎在WaiISHost自動重新啓動之前有一分鐘左右的時間來複制dll。 我試圖將入口點移動到另一個DLL中,但它並沒有出現這種技巧。 – Doug

回答

0

答案是爲您的web角色創建一個引導csproj,它什麼都不做。這將是由WaIISHost鎖定的DLL。

然後使用csdef文件中的選項將真實的Web項目創建爲單獨的網站。一旦你這樣做了,你可以使用web部署來部署你的任何網站,只要他們沒有引用你的引導DLL(因爲他們不會複製該文件),他們就可以工作