【问题标题】:Service Bus for Windows Server - The API Version is not SupportedWindows Server 的服务总线 - 不支持 API 版本
【发布时间】:2014-04-22 19:27:18
【问题描述】:

我正在考虑开发一个在本地和非本地运行的应用,并希望使用服务总线在服务之间进行通信。 我有两个问题:

  1. 我的公司网络阻止访问我的 Azure 端点,因此我无法使用真正的 Azure 服务总线。
  2. 我无法针对我的 Windows Server 服务总线使用 WindowsAzure.ServiceBus 版本 2.2.7.0。

每当我尝试使用 Windows Server 服务总线(例如 NamespaceManager.QueueExists)时,都会得到以下信息:

System.ArgumentException :远程服务器返回错误:(400)错误请求。不支持查询字符串中的 api-version。从 Uri 中删除它或使用 2012-03,2012-08,2013-04,2013-07 之一...

我怀疑我需要将 api-version 添加到 NamespaceManager.CreateFromConnectionString 但我似乎无法找到方法:(

我当前的连接字符串是:

Endpoint=sb://[我的机器]/ServiceBusDefaultNamespace;StsEndpoint=https://[我的机器]:9355/ServiceBusDefaultNamespace;RuntimePort=9354;ManagementPort=9355

无论我在哪里填充 api-version=2013-07,它都不喜欢它。

MTIA
安迪

【问题讨论】:

    标签: c# azure servicebus


    【解决方案1】:

    在这里结束是因为我在使用 Service Bus Explorer 和我的机器上本地安装的 Service Bus 1.1 时遇到了这个问题。

    问题是由于使用了最新版本的 Service Bus Explorer(当前为 2.4.1.1)。

    已使用 Service Bus Explorer 2.1 修复了该问题,该版本也包含在 Service Bus Explorer 下载中。

    使用 2.1.3.0 版本,问题就消失了。

    在这里获取。 http://code.msdn.microsoft.com/windowsazure/Service-Bus-Explorer-f2abca5a

    编辑: 上面的链接已损坏。请改用此链接。 https://code.msdn.microsoft.com/windowsapps/Service-Bus-Explorer-f2abca5a

    【讨论】:

    • 不幸的是,VS 2013 的服务器资源管理器与服务总线的连接似乎也存在同样的问题 - 它也收到了 (400) 错误请求。
    • 那个链接现在看起来不行了。知道在哪里可以找到它吗?我在同一条船上......服务总线 1.1 的本地安装。
    【解决方案2】:

    您可能在下面的链接中遇到了其他人遇到的其他问题,

    http://social.msdn.microsoft.com/Forums/windowsazure/en-US/c23a7c1f-742d-4d7f-ad4f-3bf149964762/service-bus-for-windows-server-the-api-version-is-not-supported?forum=servbus

    但是,如果您发现除了以下帖子之外几乎没有什么帮助

    http://social.msdn.microsoft.com/Forums/windowsazure/en-US/3aa6c2b8-65ac-4f8b-a36c-674698bb2f41/setting-development-environment-for-service-bus-11-on-windows-7-and-vs-2013?forum=servbus

    字里行间的快速答案是不要使用 Windows Azure SDK 2.2 附带的 Microsoft.ServiceBus v2.2.0.0。相反,获取 nuget 包“Service Bus 1.1 for Windows Server”,使用 SB 1.1 for Windows Server 一切正常。

    【讨论】:

      【解决方案3】:

      在安装了 Workflow Manager 的服务器上安装 Service bus 1.0 CU。参考:http://support.microsoft.com/kb/2799752,下载地址:https://www.microsoft.com/en-us/download/details.aspx?id=36794

      【讨论】:

        【解决方案4】:

        对于仍然遇到此问题的任何人,如上述帖子所述,此问题的解决方案来自 Microsoft.ServiceBus 程序集之间的冲突。我的项目引用了 Azure SDK 2.7 版附带的 ServiceBus DLL。我用随 Service Bus 1.1 安装的 DLL 替换了该引用并纠正了该问题。

        确保您引用的程序集与正确的版本相对应。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2020-07-04
          • 2016-05-21
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多