I am trying to create a webjob project in .NET core 3.1. I followed the following [guide]https://learn.microsoft.com/en-us/azure/app-service/webjobs-sdk-get-started , except instead of connecting to a storage account, I connect using "UseDevelopmentStorage=true" for the connection string and have the Storage emulator running.
Every couple of builds I get the exception : "Microsoft.WindowsAzure.Storage.StorageException: 'There is already a lease present.'". The exception is thrown at
using (host)
{
await host.RunAsync();
}
This does not happen on every build, and apart from using TimerTrigger, I don't use any other storage functions.
Does anyone know what is causing this?
Actually, I did solve it, but wanted to test for a couple of days. I also experienced an exception when trying to add a new method to Functions.cs. This led me to believe that something else was going on.
What fixed it for me was to remove the storage emulator and downloaded a fresh version, since then I no longer get the exceptions and I can add new functions.