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

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

问题描述

我们使用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发布(以及"dotnet构建")返回:

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:\home\site\repository\
...

详细信息:

  • 使用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引发了该错误(您可以通过commnad'dotnet --version'检查该版本)
  • 通过命令"dotnet --list-sdks",您可以查看所有已安装的SDK.
  • 然后我们简单地使用以前的版本(在本例中为v3.1.202)
  • 最简单的方法来分辨dotnet sdk的确切版本是 global.json
  • Azure applied new 'dotnet' version 3.1.301 and this version of SDK throws that error (your version you can check by commnad 'dotnet --version')
  • by command 'dotnet --list-sdks' you can see all installed SDKs
  • then we simple used previous version (in our case v3.1.202)
  • the easiest way how to tell exact version of dotnet sdk is by global.json

示例: global.json

Example: global.json

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

文件必须位于工作目录"中,并且KUDU脚本在这里具有工作目录 D:\ home \ site \ repository

And file must be in 'working directory', and KUDU script has working directory here D:\home\site\repository

如果在早期版本的dotnet SDK上部署正常,那肯定会有所帮助.

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

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

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