I've been trying out MSMQ with WCF, but I can't seem to get it to work properly. I've got the client (which sends messages to the queue) working, by using WCF and a service reference. The code that does this is more or less this:
static void Main(string[] args)
{
var client = new MsmqServiceReference.MsmqContractClient();
client.SendMessage("TEST");
client.Close();
Console.ReadKey();
}
Where MsmqContractClient is a proxy generated by visual studio when I add a service reference. The endpoint in the app.config is pointing to a msmqueue:
<client>
<endpoint
address="net.msmq://localhost/private/MsmqService/MsmqService.svc"
binding="netMsmqBinding"
bindingConfiguration="MsmqBindingNonTransactionalNoSecurity"
contract="MsmqServiceReference.IMsmqContract" name="MsmqService" />
</client>
This works, messages are being posted to the queue.
Now I am trying to actually get the service to work, but I keep getting this error:
Binding validation failed because the binding's MsmqAuthenticationMode property is set to WindowsDomain but MSMQ is installed with Active Directory integration disabled. The channel factory or service host cannot be opened.
Things I've tried are:
give everyone full access (including anonymous logon) to the queue
configuring the app to use a specific binding from the config file using:
<bindings> <netMsmqBinding> <binding name="MsmqBindingNonTransactionalNoSecurity" deadLetterQueue="Custom" exactlyOnce="false"> <security mode="None" /> </binding> </netMsmqBinding> </bindings>I tried running the app pool in IIS (7) under my own account and administrator account
What stumps me is that it