简体   繁体   中英

Service Bus for Windows Server - The API Version is not Supported

I'm considering developing an app to run on-premise and off-premise and was hoping to use the Service Bus to communicate between services. I have 2 problems:

  1. My corporate network is blocking access to my Azure endpoint so I can't use my genuine Azure Service Bus.
  2. I can't use WindowsAzure.ServiceBus version 2.2.7.0 against my Windows Server Service bus.

I get the following whenever I try using the Windows Server Service Bus (eg 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...

I suspect I need to add api-version to NamespaceManager.CreateFromConnectionString but I just can't seem to find how :(

My current connection string is:

Endpoint=sb://[my machine]/ServiceBusDefaultNamespace;StsEndpoint=https://[my machine]:9355/ServiceBusDefaultNamespace;RuntimePort=9354;ManagementPort=9355

No matter where I stuff api-version=2013-07 it doesn't like it.

MTIA
Andy

Ended up here because I was getting this issue using Service Bus Explorer with Service Bus 1.1 installed locally on my machine.

The issue was due to using the latest version of Service Bus Explorer (currently 2.4.1.1).

The issue was fixed by using Service Bus Explorer 2.1 which is also included in the Service Bus Explorer download.

Using the 2.1.3.0 version the issue went away.

Get it here. http://code.msdn.microsoft.com/windowsazure/Service-Bus-Explorer-f2abca5a

Edited: Above link is broken.Use this instead. https://code.msdn.microsoft.com/windowsapps/Service-Bus-Explorer-f2abca5a

You probably ran into some other issues others were having like in the link below,

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

however if you notice there is very little help except in the following post

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

The quick answer reading between the lines is not to use the Microsoft.ServiceBus v2.2.0.0 that comes with Windows Azure SDK 2.2. Instead, grab the nuget package "Service Bus 1.1 for Windows Server" and everything should work fine using SB 1.1 for Windows Server.

Install Service bus 1.0 CU on the server where Workflow Manager is installed. Refer to: http://support.microsoft.com/kb/2799752 and download it from: https://www.microsoft.com/en-us/download/details.aspx?id=36794

For anyone still having this issue, as the above posts say the resolution to this problem came from a conflict between Microsoft.ServiceBus assemblies. My project had a reference to the ServiceBus DLL that comes with the Azure SDK version 2.7. I replaced the reference with the DLL installed with Service Bus 1.1 and that corrected the issue.

Make sure your assemblies you are referencing correspond with the right version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM