You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure静态应用中Table绑定函数启动失败问题求助

Azure Functions 启动失败排查求助

我正在探索以.NET API(Azure Functions)为后端的Azure静态应用,目前遇到函数启动失败问题,推测是配置异常所致。我有若干绑定到Table Storage的函数,代码示例如下:

[FunctionName("BlameFunction")]
[return: Table("Blames", Connection = "StorageConnectionAppSetting")]
public static Blame Run(
    [HttpTrigger(AuthorizationLevel.Function, "get", Route = "blame")] HttpRequest req,
    ILogger log)
{
    string query = req.Query["query"];

    log.LogInformation($"BlameFunction({query})");
    if (!string.IsNullOrEmpty(query))
    {
        return new Blame { PartitionKey = "Http", RowKey = Guid.NewGuid().ToString(), Query = query };
    }

    return null;
}

本地运行一切正常,但发布后调用HTTP函数时返回Function host is not running.错误。关联的Application Insights中仅能看到如下异常:
System.FormatException at DryIoc.Microsoft.DependencyInjection.DryIocAdapter+<>c__DisplayClass3_0.<RegisterDescriptor>b__0

以及错误事件:
A host error has occurred during startup operation '10d4cacd-0f87-4bcc-ac38-8308c27acc5e'.

本地SDK版本信息

[api] Azure Functions Core Tools
[api] Core Tools Version:       4.0.4829 Commit hash: N/A  (32-bit)
[api] Function Runtime Version: 4.11.2.19273

NuGet包引用

<ItemGroup>
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="5.0.1" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Tables" Version="1.0.0" />
    <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.1" />
    <PackageReference Include="RestSharp" Version="108.0.2" />
</ItemGroup>

线上应用的SDK版本

- sdkVersion azurefunctions: 4.13.0.19486

恳请协助排查该启动失败问题。

内容的提问来源于stack exchange,提问作者xakpc

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.15 07:51:12