Recently, I was trying to run an Azure Function locally in my Visual Studio 2020 environment, and while trying to run, I got the following error:
System.InvalidOperationException: ‘Configuration is missing the ‘HostEndpoint’ information. Please ensure an entry with the key ‘Functions:Worker:HostEndpoint’ is present in your configuration.’
📝 One-Minute Brief
Seeing System.InvalidOperationException saying “Configuration is missing the ‘HostEndpoint’… ‘Functions:Worker:HostEndpoint’” usually means your .NET Isolated Azure Function worker started without the Azure Functions host. This post explains what that setting is, why you should not hardcode it, and how to fix the issue in minutes by starting the app via Functions Core Tools (func start) or the correct Visual Studio debug profile—plus a quick checklist for packages, local.settings.json, and common launch misconfigurations.
…you’re almost certainly running a .NET Isolated Azure Functions project in a way that starts the worker but not the Functions host.
Good news: this is usually a launch/config mismatch, not a code bug.
Cause
In the .NET Isolated model, your function app is split into two processes:
- Azure Functions Host (the runtime host that loads triggers, bindings, routes, etc.)
- .NET Worker (your .NET process that runs your function code)
The HostEndpoint is the connection info that the host provides to the worker at startup so they can talk to each other.
So when you see this exception, it typically means:
- ✅ Your worker started
- ❌ The Azure Functions host did not
- ➡️ Therefore, the worker never received
Functions:Worker:HostEndpoint
Functions:Worker:HostEndpoint is injected by the Functions host at startup; if the host isn’t running (or VS is launching the wrong profile), the worker can’t connect, and you get this error.
Solution
To solve this, we need to fix our local dev by ensuring the following steps:
- Make sure you’re running via the Functions host (not
dotnet rundirectly)- From the terminal in the function project folder:
func start- This runs the host and will provide the
HostEndpoint.
- From the terminal in the function project folder:
- Install/update Azure Functions Core Tools
- Core Tools is what provides the local host runtime.
- In Visual Studio: use the Azure Functions debug profile
- In VS, start the project using the Azure Functions profile (the one that starts the host), not a plain “Project” / console profile.
- Verify your project references include the Worker SDK
- Missing/incorrect packages can also trigger a broken startup in some setups. Make sure you have:
Microsoft.Azure.Functions.WorkerMicrosoft.Azure.Functions.Worker.Sdk
- Missing/incorrect packages can also trigger a broken startup in some setups. Make sure you have:
What not to do
- Don’t try to “fix” it by adding
Functions:Worker:HostEndpointmanually tolocal.settings.json— It’s a host↔worker gRPC endpoint and is normally assigned/passed by the host, not a stable value you set yourself.
In my case, I have reinstalled (fixed the installation) the Azure Functions Core Tools, and after that, restarted Visual Studio, and it solved my problem.
Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son.