I'm using msmqIntegrationBinding to send messages to a legacy MSMQ. I want to be able to use the same config file in preprod as we do in production, but in preprod the legacy queue is local whereas the production queue is on another server.
I thought I could do it with a DNS alias.
I've set up a DNS alias in the HOSTS file on my preprod server to 127.0.0.1
127.0.0.1 CRM_SERVER
I've configured the endpoint in the client to use a DIRECT OS formatname using the DNS alias
<endpoint name="LegacyMsmqService"
address="msmq.formatname:DIRECT=OS:CRM_SERVER\crmintegration"
binding="msmqIntegrationBinding"
contract="Integration.Facades.ILegacyMsmqService"
bindingConfiguration="msmqIntegrationBinding"/>
I've set the HKEY_LOCAL_MACHINE\Software\Microsoft\MSMQ\Parameters\IgnoreOSNameValidation
registry key to 1, and I've even add CRM_SERVER
to the HKEY_Local_Machine\System\CurrentControlSet\Services\LanmanServer\Parameters\OptionalNames
key.
I've restarted at least a dozen times!
Whenever my client sends a message to the queue, it's ending up on an Outgoing Queue, not on the local queue. Using the correct machine name or localhost works fine.
Have I missed something?