gpt4 book ai didi

azure - 无法在Azure Function App中创建azure.createQueueService()

转载 作者:行者123 更新时间:2023-12-03 04:23:07 27 4
gpt4 key购买 nike

我想在HTTP触发函数应用程序中浏览Azure队列存储中的队列数据。我添加“äzure-storage”Node.js 包并使用以下代码: var azure = require('azure-storage');但代码 var queueSvc = azure.createQueueService();var queueSvc = azure.createQueueService(<storage connection string>);执行函数时失败。我遇到了以下异常

"reason": "PassThrough", "exception": { "ClassName": "System.Threading.Tasks.TaskCanceledException", "Message": "A task was canceled.", "Data": null, "InnerException": null, "HelpURL": null, "StackTraceString": " at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at AzureFunctions.Code.PassThroughRequestManager.d__2.MoveNext()", "RemoteStackTraceString": null, "RemoteStackIndex": 0, "ExceptionMethod": "8\nThrowForNonSuccess\nmscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Runtime.CompilerServices.TaskAwaiter\nVoid ThrowForNonSuccess(System.Threading.Tasks.Task)", "HResult": -2146233029, "Source": "mscorlib", "WatsonBuckets": null } }

最佳答案

我无法使用 Javascript 在简单的 HTTP 触发函数中重现此问题:

  • 安装 azure-storage通过 Kudu 调试控制台 ( https://<functionname>.scm.azurewebsites.net/DebugConsole ):

    enter image description here

  • index.js文件我有这个:

    enter image description here

关于azure - 无法在Azure Function App中创建azure.createQueueService(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46681409/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com