I have function app which connect to blob , read file content and post content to API. The function works perfect on debug from Visual Studio . The problem I am having is does not work from Azure when deployed . The error I ma getting is:
Exception while executing function: MyFunctionManager
Problem Id:System.ArgumentNullException at MYFUNCTION.FA.FileManager.BlobContainerManager.GetCloudBlobContainer
It seems cannot connect and find the blob storage. In the code I am getting the container using connection string set in the local.settings.json:
public static CloudBlobContainer GetCloudBlobContainer(string blobContainer)
{
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
App.Settings.AzureFileStorageConnectionString);
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
CloudBlobContainer container = blobClient.GetContainerReference(blobContainer);
container.CreateIfNotExistsAsync();
return container;
}
Any help appreciated
Thanks
blobContainer
parameter is null. How do you get the container name ? – Thomas