Microsoft.Azure.WebJobs.Extensions.Timers.Storage: не удалось создать BlobContainerClient для ScheduleMonitor.
Я использую конструктор хостов:
Код: Выделить всё
public static async Task Main()
{
var host = CreateHostBuilder().Build();
using (host)
{
await host.RunAsync();
}
static IHostBuilder CreateHostBuilder() => new HostBuilder()
.UseServiceProviderFactory(new AutofacServiceProviderFactory())
.ConfigureFunctionsWorkerDefaults()
.ConfigureHostConfiguration(configHost =>
{
configHost.SetBasePath(Directory.GetCurrentDirectory());
configHost.AddJsonFile("host.json", optional: true);
configHost.AddEnvironmentVariables();
})
.ConfigureAppConfiguration((hostContext, configApp) =>
{
var env = hostContext.HostingEnvironment;
configApp.AddJsonFile("appsettings.json", optional: true);
configApp.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true);
configApp.AddEnvironmentVariables();
configApp.AddApplicationInsightsSettings(developerMode: !env.IsProduction());
})
.ConfigureServices((hostContext, services) =>
{
[...]
})
.ConfigureContainer(builder =>
{
builder.RegisterModule();
})
.ConfigureLogging((hostContext, configLogging) =>
{
if (hostContext.HostingEnvironment.IsDevelopment())
{
configLogging.AddConsole();
configLogging.AddDebug();
}
})
.UseConsoleLifetime();
Код: Выделить всё
[Function("QueueMessage")]
public async Task QueueMessageAsync(
[TimerTrigger("%MessageQueuerOccurence%", RunOnStartup = true)] TimerInfo timer
)
{
[...]
}
Код: Выделить всё
net6.0
v4
Exe
{
"IsEncrypted": false,
"Значения": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"MessageQueuerOccurence": "0 */15 * * * *",
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated"
}
Что я пропустил?
примечание: ссылка на Github: https://github.com/Azure/azure-function ... issues/779
Подробнее здесь: https://stackoverflow.com/questions/707 ... ulemonitor