通过msdeploy进行的Azure Web App部署错误-ERROR_INSUFFICIENT_A CCESS_TO_SITE_FOLDER [英] Azure Web App Deployment error via msdeploy - ERROR_INSUFFICIENT_A CCESS_TO_SITE_FOLDER

查看:65
本文介绍了通过msdeploy进行的Azure Web App部署错误-ERROR_INSUFFICIENT_A CCESS_TO_SITE_FOLDER的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用msdeploy部署到我的Azure Web App大约4个月了,一切顺利进行,以上传网站.直到最近,部署还没有错误.现在,发布网站应用程序时出现"ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER"错误.

I have been deploying to my Azure Web App for about 4 months now, using msdeploy, and everything has been smooth sailing to upload the website. Until recently, there has been no errors with deployment. I now receive a "ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER" error when publishing the website application.

我成功更新网站的唯一方法是在Azure上停止Web应用程序,然后通过Visual Studio对Web应用程序执行发布.但这可能是一个问题,如果用户当前正在使用该系统.我真的不希望在更新网站时发生任何停机.

The only way for me to successfully update the website is stop the Web App on Azure, then execute a Publish for the Web Application via Visual Studio. But this can be an issue if users are currently using the system. I don't really want any downtime while updating the website.

完整错误如下:

msdeploy错误ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER:Web部署任务失败.(无法对指定目录("D:\ home \ site \ wwwroot \ bin \ Domain.DbFactory.dll")执行操作(创建文件").如果服务器管理员未授权该操作用于您正在使用的用户凭据.有关更多信息,请访问: http://go.microsoft.com/fwlink/?LinkId = 221672#ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER .)

我将如何授权这些权限?

How would I go about authorising these permissions?

我还已经在Azure上重置了我的发布配置文件,并下载了一个新的配置文件以再次尝试.但这没有运气.

I have also reset my publishing profile on Azure, and downloaded a fresh profile to attempt it again. But no luck with that.

推荐答案

该错误有点欺骗.这可能与许可无关,而是由正在使用的文件引起的.

The error is a bit deceiving. This likely has nothing to do with permission, but is instead caused by files being in use.

它是否总是与 Gehs.DbFactory.dll 一起发生,还是有时还会有其他文件?另外, Gehs.DbFactory.dll 是常规托管程序集还是本机/混合程序集?

Does it always happen with Gehs.DbFactory.dll, or is it sometimes other files? Also, is Gehs.DbFactory.dll a regular managed assembly, or native/mixed assembly?

通常,所有程序集都会复制阴影,因此它们不会锁定在 bin 文件夹中.如果它是本地的,最终可能会被加载到位.

Normally, all assemblies get shadow copied, so they are not locked in the bin folder. If if it's native, it could end up getting loaded in place.

请注意,在这种情况下,它不是Azure特定的,并且在任何地方部署都可能会遇到相同的问题.例如尝试在本地运行时从您的 bin 文件夹中删除此文件.

Note that if that's the case, it's not Azure specific, and you'd likely have the same issue deploying anywhere. e.g. try deleting this file from your bin folder while running locally.

一种或另一种方式,如果要发布较新的版本,则需要确保没有文件锁定在适当的位置.

One way or another, you need to make sure that no file gets locked in place if you want to publish newer version.

如果您找不到解决方法,请使用以下技术,使其无需停机即可发布:

If you can't find a way to do this, here is a technique that should let you publish without any downtime:

  • 使用 Kudu控制台,转到您的 d:\ home \ site \ wwwroot \bin 文件夹
  • 重命名有问题的DLL,例如到 Gehs.DbFactory.dll.old (即使您无法删除,重命名操作也可以正常进行)
  • 进行发布
  • using Kudu Console, go to your d:\home\site\wwwroot\bin folder
  • Renaming the offending DLL, e.g. to Gehs.DbFactory.dll.old (renaming normally works even if you can't delete it)
  • Do your publishing

这篇关于通过msdeploy进行的Azure Web App部署错误-ERROR_INSUFFICIENT_A CCESS_TO_SITE_FOLDER的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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