发布 Azure 函数

Publishing Azure functions

我在一个不是我自己设置的项目上使用了几个 azure 函数,当我尝试发布包含这些 azure 函数的项目以更新它们时,发布失败并出现以下错误:

Web deployment task failed. (Connected to the remote computer ("demo.scm.azurewebsites.net") using the Web Management Service, but could not authorize. Make sure that you are using the correct user name and password, that the site you are connecting to exists, and that the credentials represent a user who has permissions to access the site.

我在哪里提供凭据?

以下是从 Visual Studio 发布 Azure 函数的步骤。

  1. 转到 Azure 门户
  2. 转到您的功能应用。
  3. 然后,select概览并单击Get publish profile并保存文件。

  4. 接下来,转到您的 Visual Studio 项目。

  5. 右键单击您的 Azure Functions 项目。
  6. Select 发布然后导入配置文件。
  7. 最后,点击发布。

所有需要的信息,包括您缺少的凭据,就是个人资料。

我有完全相同的问题。试图发布并得到完全相同的错误。我按照 kzrystof 的建议做了,并从 Azure 门户下载了发布配置文件并将其导入 VS2017。一旦我选择发布配置文件并单击打开按钮,我就会收到 "Publish failed" 错误消息。我检查了输出 window 以找出错误是什么,但输出中没有添加任何新内容。我清除了输出 window 并单击“发布”按钮,立即收到 "Publish failed" 错误弹出窗口,输出 window.

中没有更多详细信息

更新:通过在 VS2017 中为 Azure 上的新实例创建新配置文件,我能够成功发布 Azure Function App。然后,我从 Azure 门户中删除了旧实例。连续尝试从 VS2017 发布然后成功。

作为测试,我从 Azure 门户下载了这个新 AF 应用程序的发布配置文件并将其导入 VS2017,这仍然会产生相同的 "Publish failed" 错误弹出窗口。 MS 似乎仍需要针对该场景做一些工作。

此外,ZipDeploy 似乎仍然存在问题,因此暂时避免使用它。尝试使用 ZipDeploy 进行发布时,我总是超时。标准 WebDeploy 单独发布文件,因此没有超时问题。