CodexBloom - Programming Q&A Platform

Azure Functions not triggering from Blob Storage with 'Function host is not running' error

πŸ‘€ Views: 247 πŸ’¬ Answers: 1 πŸ“… Created: 2025-06-07
azure-functions blob-storage azure C#

I need some guidance on I'm collaborating on a project where I'm working with Azure Functions (v3) to trigger a function whenever a new blob is uploaded to my Azure Storage account. I've set up the function with a blob trigger and deployed it, but I'm getting a persistent error: 'Function host is not running'. I've checked the configurations and the connection strings, but the function doesn't seem to trigger at all. Here’s my function code: ```csharp using System; using System.IO; using Microsoft.Azure.WebJobs; using Microsoft.Extensions.Logging; public static class BlobTriggerFunction { [FunctionName("BlobTriggerFunction")] public static void Run([BlobTrigger("mycontainer/{name}", Connection = "AzureWebJobsStorage")] Stream myBlob, string name, ILogger log) { log.LogInformation($"C# Blob trigger function Processed blob Name:{name} Size: {myBlob.Length} Bytes"); } } ``` In my local.settings.json, I have the following configuration: ```json { "IsEncrypted": false, "Values": { "AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=mykey;EndpointSuffix=core.windows.net", "FUNCTIONS_WORKER_RUNTIME": "dotnet" } } ``` I've verified that the Storage account is reachable and that the connection string is correctly set up. I've also tried restarting the function app, checking application insights for any additional logs, and ensuring the runtime version is compatible. What else could be causing the function host to not run? Are there specific settings in the Azure portal that I might have missed? Is there a better approach? Am I missing something obvious? Could this be a known issue? This is my first time working with C# stable. What would be the recommended way to handle this?