Microsoft Service Bus 1.0 unable to communicate with a server outside the client's domain

落爺英雄遲暮 提交于 2019-12-06 08:55:33

问题


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...



来源:https://stackoverflow.com/questions/13179937/microsoft-service-bus-1-0-unable-to-communicate-with-a-server-outside-the-client

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!