无法使用 ASP.NET 4.6.1 应用程序创建 Azure 存储队列消息

Unable to Create Azure Storage Queue Messages with ASP.NET 4.6.1 App

我在 Azure 的 VM 中有一个旧的 ASP.NET 4.6.1 应用程序 运行ning。

我正在尝试在 Azure 存储队列中创建消息,但当我在生产 VM 上 运行 时没有任何反应。然而,在我的开发机器上,它工作正常,我可以在我试图从生产 VM 访问的同一队列中创建消息。

对队列的调用在 try catch 块内,并且没有抛出任何错误。

另一个重点是我使用了 old/deprecated WindowsAzure.Storage NuGet 包,因为它似乎适用于此 ASP.NET MVC 4.6.1 应用程序。

知道这里的问题是什么吗?因为我没有看到任何错误,所以我不确定如何解决这个问题。

根据 MS 文档,您可以尝试的一种故障排除选项是 “将 Windows 虚拟机重新部署到新的 Azure 节点”

文档说,

If you have been facing difficulties troubleshooting Remote Desktop (RDP) connection or application access to Windows-based Azure virtual machine (VM), redeploying the VM may help.

来源: https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/redeploy-to-new-node-windows

另请参阅其他故障排除步骤:

  1. 重启虚拟机
  2. 重新创建终结点/防火墙规则/网络安全组 (NSG) 规则
  3. 从不同位置连接,例如不同的 Azure 虚拟机 网络
  4. 重新创建虚拟机

There are various reasons when you cannot start or connect to an application running on an Azure virtual machine (VM). Reasons include the application not running or listening on the expected ports, the listening port blocked, or networking rules not correctly passing traffic to the application.

来源: https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshoot-app-connection

这可能是网络防火墙问题。从生产虚拟机打开 Azure 门户。您甚至可以尝试手动查看存储并从网络上传文件。