0

我嘗試將應用程序部署到Azure WebApp插槽,但它似乎嘗試更新的文件(Microsoft.Data.Edm.dll)被鎖定我已經手動停止了WebApp。我在部署我的應用程序時遇到以下錯誤。Azure WebApp:即使服務已停止,也無法修改文件

Web deployment task failed. (Web Deploy cannot modify the file 'Microsoft.Data.Edm.dll' on the destination because it is locked by an external process. In order to allow the publish operation to succeed, you may need to either restart your application to release the lock, or use the AppOffline rule handler for .Net applications on your next publish attempt. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.) 

我嘗試了VSTS web部署任務和從Visual Studio手動部署,它返回相同的錯誤消息。我嘗試重新啓動WebApp,設置COR_ENABLE_PROFILING = 0,然後再設置1,同樣的錯誤。我沒有嘗試的最後一招是刪除WebApp並重新創建..但是我想知道在我做這種絕望的措施之前是否還有其他建議。

謝謝您的高級。

回答

0

重啓更好地工作,停止只是停止HTTP監聽器,重新啓動重新啓動運行理線

+0

是啊...我嘗試重新啓動幾次...該文件仍然無法訪問 – icube

+3

正如調試的方式,您可以導航到{yoursite -slot} .scm.azurewebsites.net並使用進程選項卡查看DLL的保留情況。如果你有webjobs,他們可能會保持不動。 –

0

請儘量使用資源探險家門戶網站全面停止你的web應用程序。通過這種方式,我們可以通過FTP刪除一些鎖定的文件,而無需任何運行。有關如何完全停止您的Web應用程序的更多詳細信息,請參閱this article