1
votes

We're trying to run an azure webjob console application outside of Azure. (This works fine) We have successfully used this approach on another project as well.

We're getting the error:

The account credentials for 'X' are incorrect

This is when the web job starts. When connecting from datacenter to Azure (Blob) storage. using the AzureWebjobsDashboard / AzureWebjobsStorage connection strings.

Running the same application, with the same connection string from my local machine works. (Both are not inside Azure.

A similar weird behaviour is seen with the Azure Storage explorer, which I installed on the server where I can't connect. The storage explorer allows attaching to the account, and I can see queues and other stuff, but has trouble when I select Blob Containers (keeps loading...)

Trying the same thing on my local machine works fine as well. The storage explorer lists the blob containers and I can manage them there.

I'm using the account key based connection string, tried with a SAS token, but same error. HTTPS ports are open, and win10/ recent .net versions are installed, ...

2
On the server where you can't connect, can you install Fiddler and check the network trace (request/response)? That should give you some idea about why the requests are failing. - Gaurav Mantri
I tried this with fiddler and azure storage explorer: it shows [Fiddler] The connection to 'mystorageaccountname.blob.core.windows.net' failed. <br />Error: TimedOut (0x274c). <br />System.Net.Sockets.SocketException A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 52.239.140.42:443 - Michiel Cornille
I'm asking the infrastructure team to open that port ... I'll get back to you with more info! - Michiel Cornille
I can confirm this was a PORT issue. If you want to add your fiddler suggestion as an answer I'll accept it. - Michiel Cornille
Provided the answer. - Gaurav Mantri

2 Answers

1
votes

As mentioned in the comments, best way to diagnose these issues is to trace the request/response through a tool like Fiddler. You will get more detailed information about why the requests are failing.

0
votes

For anyone else experiencing this issue, I found that the TLS version was the problem.

I forced my WebJob to use TLS 1.2 as this was the minimum TLS version for our storage account.

I did this by directly setting the security protocol in ServicePointManager

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;