0

I am using Binding Expression and Complex Object settings like so in my blobtrigger function app. I have included "local.settings.json" file using DI by overriding ConfigureAppConfiguration() as explained in the link.

[FunctionName(nameof(UnzipFunction))]
[StorageAccount("InternalStorage:ConnectionString")]
public async Task RunAsync([BlobTrigger("%InternalStorage:Container%/{fileNameWithoutExt}.zip")] BlobClient blobClient,
                           string fileNameWithoutExt,
                           IDictionary<string, string> metadata)

Edit: Code to include json file:

public override void ConfigureAppConfiguration(IFunctionsConfigurationBuilder builder)
    {
        FunctionsHostBuilderContext context = builder.GetContext();

        builder.ConfigurationBuilder
                .AddJsonFile(Path.Combine(context.ApplicationRootPath, "local.settings.json"), optional: false, reloadOnChange: true)
                .AddEnvironmentVariables();
    }

Here's my local.settings.json. I have set CopyToPublishDirectory for this file to Always and I can see the file when App is published.

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet",
    "InternalStorage:ConnectionString": "{connection-string}",
    "InternalStorage:Container": "{container-name}"
  }
}

When I run the code locally the FunctionApp is triggered on the file upload but when I publish the app the FunctionApp is not getting triggered. I've also tried setting the variables manually on the published app, still the App isn't being triggered.

Could someone guide me if I'm doing it correctly? Is there a way debug this? My function.json looks like this: enter image description here

2
  • When you publish the Function App, it will open the home page of function app that shows the function app is running. In the Azure Portal Function App > Functions > Open the published Trigger/Function > There you have to test/run the trigger I believe. Commented Dec 13, 2022 at 10:16
  • Just noticed that under Diagnose and solve problems I am getting below error. Missing Application Settings detected The following Application Settings are referenced in Function bindings but not configured in the Function App. This can cause execution errors Function: unzipfunctionapp/UnzipFunction, Binding parameter: blobClient, Application setting: InternalStorage:ConnectionString But as I mentioned "local.settings.json" file is copied over to function app. ``` wwwroot '--bin '--UnzipFunction '--function.json '--host.json '--local.settings.json ``` Commented Dec 13, 2022 at 19:44

1 Answer 1

1

Just noticed that under Diagnose and solve problems I am getting below error. Missing Application Settings detected The following Application Settings are referenced in Function bindings but not configured in the Function App. This can cause execution errors Function: unzipfunctionapp/UnzipFunction, Binding parameter: blobClient, Application setting: InternalStorage:ConnectionString

  • Glad that you detected what is causing the error which is valid.

  • Sometimes IDEs doesn’t publish the configuration of local.settings.json to Azure Function App Configuration because this file name is present in .gitignore file where this file makes cloud to ignore the files if their names mentioned in .gitignore file.

  • And the We can have nested configuration format in local.settings.json where we call them in our function code with the separator double underscore (__) but those nested configuration format will not present in the Azure Portal App Function Configuration menu where those code of calling the configuration settings in the form of environment variable is different.

enter image description here

  • One of the similar issue 8520 registered in the Azure Functions Host Issues of GitHub Repo where you can track the status for the similar error such as Function App: Missing Application Settings detected The following Application Settings are referenced in Function bindings but not configured in the Function App and is in Open Status.
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your reply. Turns out we had some issue with our infrastructure. Because we are using private endpoints infra team had to create private DNS zone for both storage.blob.core.windows.net:443 and storage.queue.core.windows.net:443- initially we only had for Blob - because it's BlobTrigger FuncApp.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.