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

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

问题描述

我已经使用 msdeploy 部署到我的 Azure Web 应用程序大约 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:homesite wwwrootinDomain.DbFactory.dll")执行操作(创建文件").如果服务器管理员未授权此操作您正在使用的用户凭据.了解更多信息:http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER.)

msdeploy error ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER: Web deployment task failed. (Unable to perform the operation ("Create File") for the specified directory ("D:homesite wwwrootinDomain.DbFactory.dll"). This can occur if the server administrator has not authorized this operation for the user credentials you are using. Learn more at: 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:homesitewwwrootin文件夹
  • 重命名有问题的 DLL,例如到 Gehs.DbFactory.dll.old (重命名正常工作,即使你不能删除它)
  • 进行发布
  • using Kudu Console, go to your d:homesitewwwrootin 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 应用部署错误 - ERROR_INSUFFICIENT_A CCESS_TO_SITE_FOLDER的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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