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 r
When we faced the issue
<security mode="None">
worked in the test environment.
During final delivery , even that didn't work.. Finally this one worked
<security>
<transport
msmqAuthenticationMode="None"
msmqProtectionLevel="None"/>
</security>
Not sure if this is going to solve your concrete problem here, but there's a really good three-part blog post series by Tom Hollander:
Also, since the Active Directory stuff seems to be the problem, have you tried to tell your MSMQ binding to not use AD ??
<bindings>
<netMsmqBinding>
<binding name="MsmqBindingNonTransactionalNoSecurity"
deadLetterQueue="Custom" exactlyOnce="false"
useActiveDirectory="false"> <== try this setting here!
<security mode="None" />
</binding>
</netMsmqBinding>
</bindings>
Dennis van der Stelt provide a good sample on WCF + MSMQ.
You may also be interested in this Q/A on MSDN:
Q: When I run the sample that uses a default binding in workgroup mode, messages seem to get sent but are never received by the receiver.
A: By default, messages are signed using an MSMQ internal certificate that requires the Active Directory directory service. In workgroup mode, because Active Directory is not available, signing the message fails. So the message lands in the dead-letter queue and failure cause, such as “Bad signature”, is indicated.
The workaround is to turn off security. This is done by setting Mode = None to make it work in workgroup mode.
Another workaround is to get the MsmqTransportSecurity from the Transport property and set it to Certificate, and set the client certificate.
Yet another workaround is to install MSMQ with Active Directory integration.
Try these settings... useActiveDirectory
should be false by default, but try it. The authentication mode is set on the transport itself, so msmqAuthenticationMode
should be set to 'none'. msmqProtectionLevel
and clientCredentialType
sound relevant, so I threw them in there, too
: )
<bindings>
<netMsmqBinding>
<binding name="MsmqBindingNonTransactionalNoSecurity"
deadLetterQueue="Custom"
useActiveDirectory="false"
exactlyOnce="false">
<security mode="None">
<transport
msmqAuthenticationMode="None"
msmqProtectionLevel="None"
clientCredentialType="None"/>
</security>
</binding>
</netMsmqBinding>
</bindings>
I'd be concerned about removing all the security, however... if you're on a domain, you should install MSMQ with Active Directory Integration, or use Workgroup methods of securing the messages.
Also, don't forget, the settings for the server and client have to match.
HTH,
James
Sorry for the continual updates, my attention to details seems to be a bit low today
: P