如果使用DevOps部署,则在使用App Service Editor时出现错误代码409 [英] Error code 409 when using App Service Editor if deployed using DevOps

查看:178
本文介绍了如果使用DevOps部署,则在使用App Service Editor时出现错误代码409的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最近将App Service从一个应用服务计划转移到另一个应用服务计划。 现在,当我们部署使用Azure DevOps时,App Service Editor会在我们尝试编辑任何文件时返回错误代码409。 在App Service Editor中,我可以看到已发布文件的所有
。  该应用程序也无法启动。 尝试使用Visual Studio部署到它时,会出现以下错误代码。 我们已删除了"发布"个人资料并创建了一个新的个人资料,但它仍在继续。 在Devops上,我们重新创建了
版本定义,甚至删除了所有服务连接,但它仍在继续。 我怀疑它有问题。  



错误 网页部署任务失败。 ((2/7/2019 11:38:02 AM)在远程计算机上处​​理请求时发生错误。)



(2/7/2019上午11:38:02)在远程计算机上处​​理请求时发生错误。

找不到文件'D:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 。$
    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,
布尔检查主机)

    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 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.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.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)
Propensio.ServiceHost .AspNetCore C:\Program Files \dotnet\sdk\2.2.101\Sdks\Microsoft.NET.Sdk.Publish\build \ netstandard1.0\PublishTargets\Microsoft.NET.Sdk.Publish.MSDeploy.targets
140

解决方案

只是为了突出显示,msdeploy支持  App
离线模式,这会导致它创建一个名为  App_Offline.htm
部署期间的Web根文件夹(例如wwwroot)。
如果可行,您可以重新启动应用程序以查看是否有帮助。问题仍然存在,导航到Kudu(
https://yoursite.scm.azurewebsites.net/), 
然后检查是否是
文档
并告诉我们该怎么做。 


We recently moved an App Service from one App Service Plan to another.  Now, when we deploy the using Azure DevOps, the App Service Editor returns an error code 409 when we try to edit any files.  Inside of the App Service Editor, I can see all of the published files.  The app also doesn't start.  When trying to deploy to it using Visual Studio, the error code below occurs.  We've deleted the Publish profile and created a new one and yet it continues.  On Devops, we recreated the Release definition and even deleted all of the Service Connections and yet it continues.  I suspect something is wrong with it.  

Error Web deployment task failed. ((2/7/2019 11:38:02 AM) An error occurred when the request was processed on the remote computer.)

(2/7/2019 11:38:02 AM) 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 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.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.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) Propensio.ServiceHost.AspNetCore C:\Program Files\dotnet\sdk\2.2.101\Sdks\Microsoft.NET.Sdk.Publish\build\netstandard1.0\PublishTargets\Microsoft.NET.Sdk.Publish.MSDeploy.targets 140

解决方案

Just to highlight, msdeploy support an App Offline mode, which causes it to create a file called App_Offline.htm in the web root folder (e.g. wwwroot) during the deployment. If feasible, you may restart the app to see if that helps. If the issue persists, navigate to Kudu (https://yoursite.scm.azurewebsites.net/), and then check to see if it’s the case of a locked files as mentioned in the document and let us know how that goes. 


这篇关于如果使用DevOps部署,则在使用App Service Editor时出现错误代码409的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆