0

My azure function not trigger after upload my file to corresponding storage account container, but this is working fine when I test my local with following settings.

I had to use local.setting.json like below

"Values": {
....
"AzureWebJobsStorage" : "UseDevelopmentStorage=true",
"AzureStorageMyUpload" : "<<My storage account access key, 
which is get copy from my container>>"
.....
}

I real time "AzureWebJobsStorage" value is another one storage account information

"AzureStorageMyUpload" : "DefaultEndpointsProtocol=https;AccountName=<<ACCOUNT_NAME>>;AccountKey=<<ACCOUNT_KEY>>;EndpointSuffix=core.windows.net"

and

"AzureStorageMyUpload" : "DefaultEndpointsProtocol=https;AccountName=<<ACCOUNT_NAME>>;AccountKey=<<ACCOUNT_KEY>>;BlobEndpoint=https://<<ACCOUNT_NAME>>.blob.core.windows.net/;TableEndpoint=https://<<ACCOUNT_NAME>>.table.core.windows.net/;QueueEndpoint=https://<<ACCOUNT_NAME>>.queue.core.windows.net/;FileEndpoint=https://<<ACCOUNT_NAME>>.file.core.windows.net/"

My azure function below

[FunctionName("UploadCSV")]
public static async Task Run([BlobTrigger("<<containerName>>/<<folderName>>/{name}.csv", 
Connection = "AzureStorageMyUpload")]
            Stream stream, string name, ILogger log){
              log.LogInformation("UploadCSV starts");
    }

Function

Runtime version: 1.0.12922.0 (~1)

When I was created new blob trigger from the azure portal itself, it is working fine for me. the same one is not working when I create from local with help of visual studio code 2019 in azure portal it's seems like "function.json".

12
  • Did you set the AzureStorageMyUpload value in the app settings? Commented Jan 8, 2020 at 6:58
  • yes I am added my storage account information, like DefaultEndpointsProtocol=https;AccountName=<<account name>>;AccountKey=<<access key>>;EndpointSuffix=core.windows.net Commented Jan 8, 2020 at 7:01
  • and also i tried like "DefaultEndpointsProtocol=https;AccountName=<<accountName>>;AccountKey=<<accountKey>>;BlobEndpoint=https://<<accountName>>.blob.core.windows.net/;TableEndpoint=https://<<accountName>>.table.core.windows.net/;QueueEndpoint=https://<<accountName>>.queue.core.windows.net/;FileEndpoint=https://<<accountName>>.file.core.windows.net/" Commented Jan 8, 2020 at 7:10
  • Did you have AzureWebJobsStorage setting and do you have any error shown in the azure portal? Commented Jan 8, 2020 at 7:22
  • I am use "AzureWebJobsStorage" : "UseDevelopmentStorage=true" only my testing purpose, not for real time. Commented Jan 8, 2020 at 7:39

1 Answer 1

1

This is working now, I just removed connection string name and replay to

"AzureWebJobsStorage": "<<live storage account details>>"


[FunctionName("UploadCSV")]
public static async Task Run([BlobTrigger("<<containerName>>/<<folderName>>/{name}.csv", 
Connection = "AzureWebJobsStorage")]
            Stream stream, string name, ILogger log){
              log.LogInformation("UploadCSV starts");
    }
Sign up to request clarification or add additional context in comments.

2 Comments

Hi @Rajamohan Anguchamy i am also facing same issue can you help me out ?
Can you please try modify like above. When I face this issue I did the and got worked

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.