Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StorageAccount and Conection ignored if not named AzureWebJobsStorage #3057

Open
vllama opened this issue Feb 5, 2024 · 0 comments
Open

Comments

@vllama
Copy link

vllama commented Feb 5, 2024

Please provide a succinct description of the issue.
Neither the StorageAccount attribute, nor the Connection property on the BlobTrigger attribute are respected.

Repro steps

Provide the steps required to reproduce the problem

  1. Define a Function as such:
    public class AzureArtifactChange { [FunctionName("AzureArtifactChange")] //[StorageAccount("ArtifactChecker_AZURE_CONNECTION_STRING")] public void Run([BlobTrigger("artifacts/{name}", Connection = "ArtifactChecker_AZURE_CONNECTION_STRING")] Stream myBlob, string name, ILogger log) { log.LogInformation($"C# Blob trigger function Processed blob\n Name:{name} \n Size: {myBlob.Length} Bytes"); } }

  2. add Value to local.settings.json `{
    "IsEncrypted": false,
    "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "AzureWebJobsDashboard2": "dotnet",
    "ArtifactChecker_AZURE_CONNECTION_STRING": "DefaultEndpointsProtocol=https;AccountName=XXX;AccountKey=yyy;EndpointSuffix=core.windows.net"
    }

}`

  1. Step B

Expected behavior

Function runs and watches for changes to the specified container in the storage account

Actual behavior

Provide a description of the actual behavior observed.
[2024-02-05T22:47:51.844Z] Job host started [2024-02-05T22:47:51.852Z] The 'AzureArtifactChange' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'AzureArtifactChange'. Microsoft.Azure.WebJobs.Extensions.Storage.Blobs: Storage account connection string 'AzureWebJobsStorage' does not exist. Make sure that it is a defined App Setting.

Known workarounds

Provide a description of any known workarounds.

Related information

Provide any related information

  • Package version :
    PropertyGroup>
    net6.0
    v4













  • Links to source
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant