错误 - 访问被拒绝 - 部署到 Azure 应用服务 [英] Error - Access is denied - deployment to Azure App Services

查看:34
本文介绍了错误 - 访问被拒绝 - 部署到 Azure 应用服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们通过 KUDU 脚本在 Azure 中使用自动部署过程,到今天我们在 Azure 部署中心看到奇怪的错误:

We use automatic deployment process in Azure by KUDU scripts and by today we see strange error in Azure deployment center:

命令dotnet publish(以及dotnet build")返回:

Command dotnet publish (and also 'dotnet build') returns:

MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
Unhandled exception. System.ComponentModel.Win32Exception (5): Access is denied.
System.ComponentModel.Win32Exception (5): Access is denied.
   at System.Diagnostics.Process.set_PriorityClassCore(ProcessPriorityClass value)
   at System.Diagnostics.Process.set_PriorityClass(ProcessPriorityClass value)
   at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine)
   at Microsoft.Build.CommandLine.MSBuildApp.Main(String[] args)
   at System.Diagnostics.Process.set_PriorityClassCore(ProcessPriorityClass value)
   at System.Diagnostics.Process.set_PriorityClass(ProcessPriorityClass value)
   at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine)
Failed exitCode=-532462766, command=dotnet publish "D:homesite
epository
...

详情:

  • KUDU 脚本有自动部署过程
  • app 是 .NET Core 应用程序,.csproj 有目标框架:netcoreapp2.2

问题可能会在 Azure 方面,因为我们没有在项目中做任何更大的改变.有没有相同/相似的问题?

Issue probably will be on Azure side, because we did't do any bigger change in the project. Has anybody same/similar issue?

推荐答案

我们遇到了同样的问题,经过调查我们发现:

We had the same issue and after investigation we found that:

  • Azure 应用了新的dotnet"版本 3.1.301,此版本的 SDK 会引发该错误(您可以通过命令dotnet --version"检查您的版本)
  • 通过命令dotnet --list-sdks",您可以查看所有已安装的 SDK
  • 然后我们简单地使用以前的版本(在我们的例子中是 v3.1.202)
  • 如何判断 dotnet sdk 的确切版本的最简单方法是通过 global.json

示例:global.json

Example: global.json

{
  "sdk": {
    "version": "3.1.202"
  }
}

并且文件必须在'工作目录'中,并且KUDU脚本在这里有工作目录D:homesite epository

And file must be in 'working directory', and KUDU script has working directory here D:homesite epository

如果您的部署在早期版本的 dotnet SDK 上没有问题,那么这肯定会有所帮助.

When your deployment was OK on previous version of dotnet SDK, than this should definitely help.

这篇关于错误 - 访问被拒绝 - 部署到 Azure 应用服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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