visual-studio - 在本地运行 Azure Functions

标签 visual-studio azure azure-storage azure-functions

我已经在 Visual Studio 2017 中开发和调试 Azure Functions 几个月了,没有出现任何问题,但现在遇到了错误。

每次运行我的函数应用程序时,我都会收到以下对话框,这有时会导致我的函数尝试执行,有时则不会。

enter image description here

如果进程通过了上述问题,我会收到以下错误,这些错误会终止我的函数的执行。

enter image description here

还有其他人遇到过这些问题吗? 谢谢。

最佳答案

提示是告诉你VS正在下载最新版本的function cli,你可以查看cli输出,你可能会看到

Starting Host (HostId=someId, InstanceId=someId, Version=2.0.11960.0,...)

主机版本2.0.11960(VS feed使用2.4.0)代表VS使用最新版本。通常新版本确实有一些重大更改,但这次正如您提到的,它确实可以在主机版本为 2.0.11961 的 Azure 上运行(这个微小的差异应该不会影响您的代码)。

您的代码似乎在 Azure 文件共享上运行,我看到错误消息

Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature

存储 SDK 操作转换为 REST http 请求。当存储无法验证我们的请求时,通常会发回此错误消息。

如果您已验证存储连接字符串(尤其是帐户 key )正确,请检查本地电脑的时间设置。 REST 请求使用 x-ms-date header 发送。并且该值是从您的本地电脑捕获的,如果它比标准时间早 15m+,我们将收到身份验证错误。

关于visual-studio - 在本地运行 Azure Functions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51881522/

相关文章:

ios - Visual Studio 需要凭据才能在 Mac 上访问 pkgs.dev.azure.com

c# - 如何从 MS Bot Framework、Skype For Business 获取除 "conversationUpdate"和 "endOfConversation"之外的其他值

用户代码未处理 AZURE:ProviderInknownException

visual-studio - .NET CLI (dotnet) 版本 : exclude project from solution

c++ - dlldata.c不是在win32下生成的?

c# - Azure 上无法识别 WebAPI 路由

azure - 使用 Azure 策略定义启用存储帐户的诊断设置

c# - 在 ASP.NET 中使用文件 uploader 将图像上传到 Azure Blob?

node.js - 无法使用 npm 安装 asyncawait

c# - 找不到方法 : 'System. 字符串 RazorEngine.Templated.ITemplate.Run