Microsoft Service Bus 1.0 unable to communicate wi

2020-07-23 03:47发布

问题:

I have installed Service Bus 1.0 on a server joined to a Domain.

From a client app running on a PC joined on the same domain, I am able to create queues, messages, etc. I use a connection string specifying credentials of a user on the same domain. Everything works.

From a client app running on a PC outside the domain, nothing works. I was thinking it was related to the fact that it was not possible to use a user from the server domain if the client app was not on the same domain, so I also try to use a connection string containing a SharedSecretIssuer and a ShareSecretValue. With this approach I got:

The token provider service was not avaliable when obtaining a token for 'https://servicebus01.dns1.XXXXXX.com:9355/XXXXXServiceBus/WRAPv0.9/'. Innner exception contains "The remote server returned an error: (404) Not Found.".

Anyone knows if it is possible to communicate with a Service Bus server outside the domain of this server?

回答1:

Alternatively, even if your client is not joined to the domain, you can use the OAuthTokenProvider.

Once you have created your namespace manager and factory and before doing any operation:

namespaceManager.Settings.TokenProvider = TokenProvider.CreateOAuthTokenProvider(new Uri[] { new Uri("https://servicebus01.dns1.XXXXXX.com:9355") }, new NetworkCredential("user", "password", "domain"))

messagingFactory.GetSettings().TokenProvider = TokenProvider.CreateOAuthTokenProvider(new Uri[] { new Uri("https://servicebus01.dns1.XXXXXX.com:9355")}, new NetworkCredential("user", "password", "domain"));



回答2:

I found the problem!

The computer running the client app was not joined on a domain at all. It must be join to a domain, even if there is not trust between the clients and servers domains.

Strange limitation...



标签: servicebus