azure - 无法将 Azure Function 添加为流分析作业输出

标签 azure azure-functions azure-stream-analytics

我正在尝试将函数作为输出添加到 ASA 作业。我已阅读了我能找到的所有帖子和建议。尝试了以下方法:

  • 添加了值为“Files”的 AzureWebJobsSecretStorageType(也尝试了小写“files”)
  • 将 TLS 版本降低至 1.0
  • 将函数 AuthorizationLevel 设置为匿名
  • 尝试过应用级别和功能级别按键
  • 经过 Postman 测试 - 使用 POST 方法始终正常工作

但在作业输出 ui 中仍然出现此错误(手动和自动输出设置):

System.InvalidOperationException: Runtime keys are stored on blob storage. This API doesn't support this configuration. Please change Environment variable AzureWebJobsSecretStorageType value to 'Files'. For more info, visit https://aka.ms/funcsecrets at Kudu.Core.Functions.FunctionManager.

使用自动设置(从订阅中选择 Azure Function),我在函数日志中收到 404:

Outgoing response, type: response, statusCode: 404, statusText: NotFound

我的函数代码:

public static class AsaRequestRouter {
        [FunctionName ("AsaRequestRouter")]
        public static async Task<IActionResult> Run (
            [HttpTrigger (AuthorizationLevel.Function, "get", "post", Route = null)] 
            HttpRequest req,
            ILogger log) {                
            log.LogInformation ("C# HTTP trigger function processed a request.");
            string requestBody = await new StreamReader (req.Body).ReadToEndAsync ();
            log.LogInformation(requestBody);
            return new OkObjectResult (@"{""response"":""OK""}");
        }
    }

最佳答案

我遇到了类似的情况,最终为我的流分析作业创建了一个函数应用程序,该应用程序只有 azure 函数和应用程序设置AzureWebJobsSecretStorageType,值为“Files”.

创建新函数应用程序后,我返回流分析作业 -> 输出并尝试添加 Azure 函数作为输出接收器并提供详细信息,但当 Azure 尝试在其中显示函数应用程序时出现延迟您的订阅。但是,一旦我选择了新的函数应用程序,错误就消失了。

关于azure - 无法将 Azure Function 添加为流分析作业输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64446932/

相关文章:

asp.net - Windows Azure 应用程序崩溃 IISConfigurator.exe

azure - Android 设备未从 Azure 通知中心收到通知消息

Azure Functions 中缺少 R 站点扩展

azure - Visual Studio 部署队列触发器 Azure Functions

azure-functions - 确认您的 Key Vault 的状态

Azure 流分析引用输入无法从存储 blob 读取

c# - Graph API - 使用 .Net Core 3.1 添加架构扩展

Azure 流分析 : "Stream Analytics job has validation errors: The given key was not present in the dictionary."

azure - 流分析查询达到大小限制

azure - 使用 Az CLI 将 Azure 事件日志连接到 Log Analytics 实例