我正在尝试将函数作为输出添加到 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/