Windows 连接字符串指定帐户名和帐户密钥的 Azure 存储异常

Windows Azure Storage Exception with Connection String Specifying Account Name and Account Key

我正在将 Windows Azure 存储添加到我的 ASP.Net 应用程序。我正在使用 NetStandard 1.4 并在 MacOS 上构建。

根据 docs.microsoft.com 的建议,我将以下内容作为我的连接字符串:

DefaultEndpointsProtocol=http;AccountName=XXXXXX;AccountKey=XXXXXX

我正在连接一个新的 Azure 存储帐户,并已确认我的帐户名和帐户密钥是正确的。在调用创建 table 之前,我添加了一个 WriteLine 来显示 CloudStorageAccount 的连接字符串 URI,以确保它是正确的。它有主机名。

执行 "dotnet run" 时出现以下错误。

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AggregateException: One or more errors occurred. (An error occurred while sending the request.) ---> Microsoft.WindowsAzure.Storage.StorageException: An error occurred while sending the request. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.CurlException: Couldn't resolve host name

设置显式 table 存储端点 (TableEndpoint=XXX.table.core.windows.net) 也不起作用。

Curl 在连接到 XXX.table.core.windows.net 时会失败还有其他原因吗?

尝试捕获网络跟踪以进行故障排除?并尝试 ping XXX.table.core.windows.net?是不是DNS缓存没有刷新?