Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft Service Bus on a Windows Workgroup

Tags:

servicebus

I just started playing with Microsoft Service Bus. Now my personal challenge is that I'm doing this after hours, on my own time, etc, which means I am using VMs and Non-Domain pcs. These guys are all workgroup.

I've had pretty decent success, especially after I stumbled across this link: Microsoft Service Bus 1.0 unable to communicate with a server outside the client's domain

This guy provided a much needed boost to get me past being able to use the namespace to create queues, etc.

However, went I get to the QueueClient.Send() function, I'm still getting (and I paraphrased that a bit).

"The token provider was unable to provide a security token while accessing 'https://Windows2008Server:9355/ServiceBusDefaultNamespace/$STS/Windows/'. Token provider returned message: ''.

The same code from the link above is what I'm using for the message factory. So my question becomes, does anybody have any ideas on how to get past this send to work?

If I can get past this little issue then I can start seeing what Service Bus can really do.

Thanks so much!

Nick


Same issue as before, changed my code to be this:

        TokenProvider localUserTokenProvider = WindowsTokenProvider.CreateWindowsTokenProvider(connBuilder.StsEndpoints,new System.Net.NetworkCredential("LocalServer", "LocalPassword"));

        MessagingFactory messageFactory = MessagingFactory.Create(connBuilder.GetAbsoluteRuntimeEndpoints(), localUserTokenProvider);
        NamespaceManager namespaceManager = new NamespaceManager(connBuilder.GetAbsoluteManagementEndpoints(), localUserTokenProvider);

So, it looks like I still need to have the same account on both of them...

like image 902
Nick Jacobs Avatar asked Mar 13 '13 23:03

Nick Jacobs


1 Answers

I see. In that case, since you're using windows in both sides, you don't need the OAuthTokenProvider. You can use a Windows Token provider, just make sure of the following: - The credentials you're passing must exist in the server - Don't include any domain or workgroup information in the credential.

You need to configured it like this (the sample assumes you're using a config file for your connection strings):

TokenProvider localUserTokenProvider = WindowsTokenProvider.CreateWindowsTokenProvider(
            connBuilder.StsEndpoints,
            new System.Net.NetworkCredential (userName, password));

This page has more information on how to work 'offline' with Service Bus Server.

like image 89
Ramiro Berrelleza Avatar answered Oct 21 '22 00:10

Ramiro Berrelleza