azure - 无法从 Visual Studio 2019 Web 部署到 Linux 应用服务
问题描述
现在大约 2 周以来,我无法从 Visual Studio 2019 16.9.6 进行 Web 部署。我有一个 ASP.NET Core 3.1 MVC 应用程序,我正在尝试将它通过网络部署到 Azure 上的 Linux 应用服务。当我尝试发布时,出现以下错误:
Publish has encountered an error.
Build failed. Check the Output window for more details.
A diagnostic log has been written to the following location:
"C:\Users\ken\AppData\Local\Temp\tmpF3BF.tmp"
An error occurred when the request was processed on the remote computer.
The server experienced an issue processing the request. Contact the server administrator for more information.
在两周前,我没有任何问题。以下是我尝试过的项目列表:
- 停止并启动应用服务
- 停止应用服务并在停止时尝试部署
- 重置发布配置文件并将其重新导入 Visual Studio
如果我编辑发布配置文件并单击“验证连接”它会失败并给出与上面相同的错误消息:
An error occurred when the request was processed on the remote computer.
The server experienced an issue processing the request. Contact the server administrator for more information.
我能够在本地发布并使用 FTPS 客户端连接到应用服务并手动部署文件。
解决方案
我删除了当前的发布配置文件,而不是从 Azure 门户下载它,而是使用 Visual 中内置的新发布配置文件向导来创建发布配置文件。一旦我这样做了,一切都开始部署,没有任何问题。我查看了其中的区别,似乎我从 Azure 下载的发布配置文件缺少一个名为“IsLinux”的 XML 元素。