I'm exploring Azure Static App with dotnet API (Functions) as a Backend.
Unfortunately, my functions are failing to start, probably due to a configuration issue. I have a couple of functions that are bound to 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;
}
Locally everything works fine, but when I publish my HTTP function calls respond with the Function host is not running.
error.
All I see in linked application insights are exceptions:
System.FormatException at DryIoc.Microsoft.DependencyInjection.DryIocAdapter+<>c__DisplayClass3_0.<RegisterDescriptor>b__0
and error events:
A host error has occurred during startup operation '10d4cacd-0f87-4bcc-ac38-8308c27acc5e'.
local 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>
web app SDK
- sdkVersion azurefunctions: 4.13.0.19486