我们最近将应用服务从一个应用服务计划移至另一个。现在,当我们使用 Azure DevOps 部署时,应用服务编辑器在尝试编辑任何文件时返回错误代码 409。在应用服务编辑器中,我可以看到所有已发布的文件。该应用程序也无法启动。尝试使用 Visual Studio 部署到它时,出现以下错误代码。我们删除了发布配置文件并创建了一个新的,但它仍在继续。在 Devops 上,我们重新创建了发布定义,甚至删除了所有服务连接,但它仍在继续。我怀疑应用服务本身出了问题。
错误 Web 部署任务失败。((2019 年 2 月 7 日上午 11:38:02)在远程计算机上处理请求时发生错误。)
(2019/2/7 11:38:02 AM) 在远程计算机上处理请求时发生错误。找不到文件“D:\home\site\wwwroot\App_Offline.htm”。在 System.IO.__Error.WinIOError(Int32 errorCode,String maybeFullPath)在 System.IO.FileStream.Init(字符串路径,FileMode 模式,FileAccess 访问,Int32 权限,布尔 useRights,FileShare 共享,Int32 bufferSize,FileOptions 选项,SECURITY_ATTRIBUTES secAttrs,字符串 msgPath,布尔 bFromProxy,布尔 useLongPath,布尔 checkHost)在 System.IO.FileStream..ctor(字符串路径,FileMode 模式,FileAccess 访问,FileShare 共享,Int32 bufferSize,FileOptions 选项,字符串 msgPath,布尔 bFromProxy)在 System.IO.FileStream..ctor(字符串路径,FileMode 模式,FileAccess 访问,FileShare 共享,Int32 bufferSize,布尔 useAsync)在 System.Xml.XmlWriterSettings.CreateWriter(字符串 outputFileName)在Microsoft.Web.Deployment.AppOfflineRuleHandler.AddAppOfflineFilesToEachApp(DeploymentBaseContext baseContext, Boolean whatIf) 在 Microsoft.Web.Deployment.AppOfflineRuleHandler.AddChild(DeploymentSyncContext syncContext, DeploymentObject destinationParentObject, DeploymentObject& sourceObject, Boolean& continue) 在 Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position) 在 Microsoft.Web.Deployment.DeploymentSyncContext.SyncDirPathChildren(DeploymentObject destRoot, DeploymentObject sourceRoot) 在 Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source) 在 Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source) 在Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source) 在 Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source) 在 Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source) 在 Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject) 在 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) Propensio.ServiceHost.AspNetCore C:\Program文件\dotnet\sdk\2.2.101\Sdks\Microsoft.NET.Sdk.Publish\build\netstandard1.0\PublishTargets\Microsoft.NET.Sdk.Publish.MSDeploy.targets 140
答案1
我在将代码从 Azure DevOps 推送到我的 WebApp 时遇到了类似的问题。我无法编辑文件,尝试时出现 409。我尝试在“Azure App Service Deploy”步骤中将 WebDeploy(默认设置)更改为 ZipDeploy。不确定这些信息是否仍然对您有用,但如果其他人来到这里,希望它能有所帮助!