The code is working in Core 3.0 preview7 version, but after updating to 3.0 Azure functions started giving an error.
The error comes if I try to access builder servi
ASP.NET Core 3.0 not currently available for Azure App Service. [Microsoft Docs]
I understand the preview versions of .NET Core 3.0 [Microsoft Docs] are available on the Azure service.
Azure Functions 3.0, which will be fully compatible with Core 3.0, will be available in October - see this announcement