我正在考虑开发一个在内部和外部运行的应用程序,并希望使用服务总线在服务之间进行通信。 我有两个问题:
- 我的公司网络阻止访问我的 Azure 端点,因此我无法使用正版 Azure 服务总线。
- 我无法针对 Windows Server 服务总线使用 WindowsAzure.ServiceBus 版本 2.2.7.0。
每当我尝试使用 Windows Server 服务总线(例如 NamespaceManager.QueueExists)时,我都会收到以下信息:
System.ArgumentException : The remote server returned an error: (400) Bad Request. The api-version in the query string is not supported. Either remove it from the Uri or use one of 2012-03,2012-08,2013-04,2013-07...
我怀疑我需要将 api-version 添加到 NamespaceManager.CreateFromConnectionString 但我似乎找不到如何:(
我当前的连接字符串是:
Endpoint=sb://[my machine]/ServiceBusDefaultNamespace;StsEndpoint=https://[my machine]:9355/ServiceBusDefaultNamespace;RuntimePort=9354;ManagementPort=9355
无论我把 api-version=2013-07 塞到哪里,它都不喜欢。
MTIA
安迪
最佳答案
之所以到此结束,是因为我在使用 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
关于c# - Windows Server 服务总线 - 不支持 API 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22456947/