1
votes

Why this console program (WCF host) work normally with remote queue (MSMQ) on Windows XP computer but not work on Windows 7? (.net Framework 4.5 (4.0 same situation))

MSMQ Remote private queue (with messages) on Windows Server 2003 R2. One test client - Windows XP Prof. Second test client Windows 7 Prof. Identical config file on both machines.

MSMQ installed and started on all machines.

I have a program host (console host) for WCF.

 var host = new System.ServiceModel.ServiceHost (typeof (TestMessageReceiver ));
    host.Faulted += HostFaulted;
    host.Open();

Config file(part):

<system.serviceModel>
    < services>
      < service behaviorConfiguration =" myBehavior" name="TestMSMQwin7.TestMessageReceiver" >
        < endpoint address="net.msmq://zzz.zzz.zzz.com/private/rbcmessagestest"
                   binding="netMsmqBinding"
                   bindingConfiguration="ReceiverMSMQconfig"
                   contract="RBC.Receiver.ContractInterfaces.IMessageReceiver" />
        < host>
          < baseAddresses>
            < add baseAddress="http://xxx.xxx.xxx.com:8089/MessageReceiver" />
          </ baseAddresses>
        </ host>
      </ service>
    </ services>
    < behaviors>
<!--...-->
    </ behaviors>
    < bindings>
      < netMsmqBinding>
        < binding name =" ReceiverMSMQconfig" maxReceivedMessageSize="5242880"   maxBufferPoolSize="5242880"  >
          < readerQuotas maxDepth =" 32" maxStringContentLength= "5242880 "   maxArrayLength="16384" maxBytesPerRead =" 4096" maxNameTableCharCount= "16384 "/>
          < security mode =" None" />
        </ binding>
      </ netMsmqBinding>
    </ bindings>
  </system.serviceModel>

And Question: why this console program (WCF host) connects and works great with the remote queue (receive messages) on a computer running OS Windows XP, but does not work on a computer running Windows 7?

On Windows 7 computer i have next exception ( host.Open();):

System.InvalidOperationException HResult=-2146233079 Message= Binding validation failed because the endpoint listen URI does not represent an MSMQ direct format name. The service host cannot be opened. Make sure you use a direct format name for the endpoint's listen URI. Source=System.ServiceModel

1
Did you resolve this?tom redfern
No,i have not solved the problem :-(EVS
Did you find a mismatch in the msmq versions on client and server?tom redfern

1 Answers

0
votes

A bit of googling revealed this:

http://rabblerule.blogspot.co.uk/2010/08/more.html

Which seems to say that you will get this error if the server hosting the endpoint is not running a lower version of MSMQ than your client.

Which in your case the server is win2003 server, which will be running MSMQ 3.0 and the client is win7 which will be running MSMQ 5.0 (see here for version table).

So you just need to use the same or more "similar" versions of MSMQ for service and client ends.