NetMsmqBinding only works if you have WCF on both sides of the Queue-to-Queue transfer.
MsmqIntegrationBinding is targeted toward existing MSMQ applications that use COM, native C++ APIs or the types defined in the System.Messaging namespace (as stated by MSDN).
Messages from one of the bindings are not compatible with the other binding type.
MsmqIntegrationBinding uses a pre-WCF serialization format, by way of the SerializationFormat property, which is of type enum MsmqMessageSerializationFormat.
The members being: Xml, Binary, ActiveX, ByteArray, Stream.
NetMsmqBinding has the following 2 binding elements:
MsmqIntegrationBinding has only one binding element:
BinaryMessageEncodingBindingElement.MessageVersion which is only available on the NetMsmqBinding specifies the WCF supported versioning information.
How do we set the security mode on the standard msmq bindings?
NetMsmqBinding.Security gets the NetMsmqSecurity associated with this binding.
MsmqIntegrationBinding.Security gets the MsmqIntegrationSecurity associated with this binding.
NetMsmqSecurity has the following properties:
Message, Mode, Transport.
MsmqIntegrationSecurity has the following properties:
The Mode properties return the security modes…
MsmqIntegrationSecurityMode in the case of MsmqIntegrationSecurity.Mode.
NetMsmqSecurityMode in the case of NetMsmqSecurity.Mode.
Imperatively set security mode:
Declaratively set security mode:
<configuration> <system.ServiceModel> <bindings> <netMsmqBinding> <binding name="MyNetMsmqBinding"> <security mode="Message"/> </binding> </netMsmqBinding> <msmqIntegrationBinding> <binding name="MyMsmqIntegrationBinding"> <security mode="Transport"/> </binding> </msmqIntegrationBinding> </bindings> </system.ServiceModel> </configuration>
According to this MSDN post, it appears as if the default security mode is Message for NetMsmqBinding and Transport for MsmqIntegrationBinding.
The default security mode for both NetMsmqBinding and MsmqIntegrationBinding is Transport.