Thanks for asking question! Just to confirm if you are using Version 3.x? As Version 3.x of the WebJobs SDK supports both .NET Core and .NET Framework console apps and for this you may refer to official document on outlined steps to deploy WebJobs. To add to this Starting with version 3.x, you must explicitly install the Storage binding extension required by the WebJobs SDK.
Console App running as Web Job not able to access Azure Blob Storage
I have a simple part of a .NET console application running as a Web Job under an App Service. It checks if a blob exists in a specified container:
var blobServiceClient = new BlobServiceClient(connectionString);
var containerClient = blobServiceClient.GetBlobContainerClient(customScriptsContainer);
var blobClient = containerClient.GetBlobClient(scriptFile + ".cs");
When I run the console app on my localhost everything works fine, it connects and retrieves the blob if it exists.
But when running in Azure - with the exact same connectionstring and container name - the code times out on the last line with an error "Retires failed after 6 attempts".
It seems like it is not able to get a connection to the storage account at all.
Can it be something the needs to be configured/opened between the App Service and the storage account?