Question

Is it able to send Azure service bus message in a Windows Service?

Recently, I build a Windows NT Service to send message to Azure queue. But it failed. I created two test console application, one uses the same code as my Windows NT Service to send Service Bus message, another one to receive the message. The test console applications successfully send and receive messages. In my windows NT service, it dosen't throw any messages or errors.

What I want to know is that whether Azure Service Bus Message is supported in Windows NT Service.

My application is neither a worker role nor a web role. It is just a Windows NT service.

Was it helpful?

Solution

The Service Bus client code works the same anywhere else, including Windows Services.

But!

NT Services often run as Local Service or Network Service on your machine and depending on your network setup, that account may not have sufficient rights to talkthroiugh intermediareies like proxies. We know that at several of our clients, IT doesn't allow machine accounts through the external proxies and therefore the machine account won't work. That said, you should and will see exceptions being thrown if communication does not work, so you should double-check your code for that and/or also turn on WCF tracing.

Clemens

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top