小编Nir*_*mie的帖子

在逻辑应用程序中运行时Azure函数404错误

我在 Azure 中构建了一个简单的函数,它从 json 正文中获取文件的位置,并读取第一行以从所述文件中获取标头。我正在 Visual Studio 中构建该函数并使用打包部署发布它。

我可以在 Azure Functions 下的门户上测试该函数并获得返回结果,但是当我在逻辑应用程序中尝试该函数时,出现 404 Not Found 错误。

我已经创建了 MS 提供的示例 HTTPRequest 函数,并且在相同的函数名称下工作正常,但我不确定为什么我编写的函数不起作用。

下面是我用于该函数的代码

using System;
using System.IO;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;

namespace Functions
{
    public static class GetTableHeaders
    {
        [FunctionName("GetTableHeaders")]
        public static async Task<IActionResult> Run(
            [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
            IBinder binder,
            ILogger log)
        {
            log.LogInformation("C# HTTP trigger function processed a request.");

            string guid = req.Query["guid"]; …
Run Code Online (Sandbox Code Playgroud)

c# azure azure-logic-apps azure-functions

4
推荐指数
1
解决办法
6886
查看次数

标签 统计

azure ×1

azure-functions ×1

azure-logic-apps ×1

c# ×1