Problem getting messages from MSMQ on remote computer

doodoo Member Posts: 12
Hello,

I'm trying to solve a problem with a webservice I developp to communicate between Navision and a web Interface using Message Queuing.

- Navision SQL Database is installed on a Windows Server 2003 attached to Active directory. With MSMQ in AD mode.
- My WebService is on a Windows Server 2003 WebEdition on a Workgroup, not in the same Domain
- My MSMQ queues (private$\tonavision & private$\fromnavision) are on the WebService serveur (workgroup mode)
- Web Interface is on a windows server 2003 attached to active directory too, With MSMQ in AD mode too.

From the web Interface, I post message on tonavision queue using my webservice. That work fine !

But when I try to get the message from Navision, I have this error "The Remote computer is not available".
when executing "MQBus.OpenReceiveQueue(...)"

Here is part of the code :
CREATE(MQBus);
CREATE(CC2);
CREATE(XMLDom);

//ADD BUS ADAPTER TO COMMUNICATION COMPONENT AUTOMATION VARIABLE
CC2.AddBusAdapter(MQBus, 1);

//ADAPTER CONFIGURATION : MESSAGE QUEUE THAT CODE WILL BE LISTENING FOR NEW MESSAGES
MQBus.OpenReceiveQueue('DIRECT=IP:XX.XX.XX.XX\private$\tonavision',0,0);
"XX" is the IP address of my Webservice serveur where queues are setups

I try this other way but always the same message :
MQBus.OpenReceiveQueue('DIRECT=IP:XX.XX.XX.XX\tonavision',0,0);
MQBus.OpenReceiveQueue('XX.XX.XX.XX\private$\tonavision',0,0);
MQBus.OpenReceiveQueue('XX.XX.XX.XX\tonavision',0,0);
//After adding ip and hostname into file 'hosts' from ..\system32\drivers\etc
//XX.XX.XX.XXX MyWebServ
MQBus.OpenReceiveQueue('MyWebServ\private$\tonavision',0,0);
MQBus.OpenReceiveQueue('DIRECT=OS:MyWebServ\private$\tonavision',0,0);
MQBus.OpenReceiveQueue('MyWebServ\tonavision',0,0);
MQBus.OpenReceiveQueue('DIRECT=OS:MyWebServ\tonavision',0,0);

Did someone have a solution ? Is there some known problems when trying to open Queues on a remote computer with Navision ?

I make lot of search on different forums but didn't find anything that help me !

I nead your help ! please. [-o<

Thanks a lot.

Ludovic

Comments

  • jlandeenjlandeen Member Posts: 524
    I've had similar problems with remote connection to Queues in the past. I found the easiest solution was to setup the queues as private queues on the same machine as the NAS. It was a lot easier to make .Net code talk to Queues on a remote machine rather then getting NAV to talk to a queue on a remote machine so I handled it that way.

    There are some functions that don't work when you're dealing with remote queues that NAV may be using behind the scenes. Some of the Peek methods on the MSMQ objects didn't work well across machine boundaries (not sure if it's security or execution context problems) so I assumed that may be the problem with the COM control that NAV uses.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • doodoo Member Posts: 12
    Hi Jeff,

    Thanks for your answer. As you suggest on your post, I setup private queues directly on the same machine as the nas. Now Queues are accessible from Navision.

    But ! A can read and send message from Navision, and impossible to send and receive message from my webservice !!!

    - Navision and Queues are on Server1 with Active Directory
    - Webservice on Server2 in Workgroup mode

    When I post a message with Webservice to Server1 private queue, using "FormatName:DIRECT=TCP:XX.XX.XX.XX\private$\tonavision" to connect to the queue (Visual Basic), the message is stored into Server2 Outgoing Queue with "Wainting to connect..." Status. And it's never delivered to the final queue on server1 !!!!!

    I know that's not directly linked to Navision, but maybe you can help for this new case with your experience with MSMQ ? Thanks a lot

    I try to find a solution for this project, but every time I turn the problem in another way to solve it, I came across something else that blocks ](*,)
  • jlandeenjlandeen Member Posts: 524
    Yeah I remember that being a pain to get working. You may want to check out you security context between the 2 machines - the remote queue needs to konw that you're authorized to send it stuff. Also check out: http://infosysblogs.com/microsoft/2007/02/msmq_sending_message_to_remote.html as it may have a few other suggestions.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • doodoo Member Posts: 12
    Hi Jeff,

    Thanks for your help ! I go to the link you forward me and I'm trying to solve my problem with these informations. I think I'will find something good there.
  • jlandeenjlandeen Member Posts: 524
    no worries good luck.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
Sign In or Register to comment.