gpt4 book ai didi

azure - 从 Visual Studio 和应用服务进行 Web 部署出了什么问题?

转载 作者:行者123 更新时间:2023-12-03 09:14:22 26 4
gpt4 key购买 nike

Web 部署突然开始失败。

Could not find file 'D:\home\site\wwwroot\App_Offline.htm'.

我停止了服务,但部署仍然失败。

当我尝试在 Kudu PowerShell UI 中从 wwwroot 删除任何文件时,出现错误“404 文件未找到”,但刷新后该文件仍然显示。当我尝试直接在 powershell 中删除文件时出现错误

Cannot remove item D:\home\site\wwwroot\Azure.Storage.dll: Invalid access to memory location.
At line:1 char:1
+ del .\Azure.Storage.dll
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (D:\home\site\wwwroot\Azure.Storage.
dll:FileInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell
.Commands.RemoveItemCommand

我删除了该服务,重新创建了它,并且从 Visual Studio 进行的第一次部署正常。但第二天部署又失败了。这些部署之间唯一的区别是从 VSTS 进行部署。但我之前能够以任何顺序从 VSTS 和 Visual Studio 进行部署,没有任何问题。

我是该应用服务的所有者。

部署日志。

(2018-08-06 13:05:03) An error occurred when the request was processed on the remote computer.
Could not find file 'D:\home\site\wwwroot\App_Offline.htm'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
at System.Xml.XmlWriterSettings.CreateWriter(String outputFileName)
at System.Xml.XmlWriter.Create(String outputFileName, XmlWriterSettings settings)
at Microsoft.Web.Deployment.AppOfflineRuleHandler.AddAppOfflineFilesToEachApp(DeploymentBaseContext baseContext, Boolean whatIf)
at Microsoft.Web.Deployment.AppOfflineRuleHandler.AddChild(DeploymentSyncContext syncContext, DeploymentObject destinationParentObject, DeploymentObject& sourceObject, Boolean& proceed)
at Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncDirPathChildren(DeploymentObject destRoot, DeploymentObject sourceRoot)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject)
at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)
at Microsoft.Web.Deployment.DeploymentAgent.HandleSync(DeploymentAgentAsyncData asyncData, Nullable`1 passId, String user, String siteName)
Publish failed to deploy.

最佳答案

突然间 VSTS 默认部署模式变成了 Run-From-Zip。

解决方案是在 VSTS 部署中设置选择部署方法复选框,并确保选中Web 部署

要“解锁”服务,您需要从 Azure 门户的“应用程序设置”页面删除设置 WEBSITE_RUN_FROM_PACKAGE - 它位于“配置”下

enter image description here

关于azure - 从 Visual Studio 和应用服务进行 Web 部署出了什么问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51700538/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com