MSMQ & NAS & DMZ

beetlestonebeetlestone Member Posts: 46
I have a problem similar to one already posted by burfab.

To summarise there is a Web Server with MSMQ installed. Private MSMQ are used. This server is sat in a DMZ. The queue here can be written to from the Internet so that side of the comms is ok.

Navision and NAS exist on a server within the DOMAIN. MSMQ is installed on the Navision server.

The firewall and ISA are configured to allow access from the DOMAIN, though this has only been confirmed by a technical engineer.

The NAS needs to fire code so that the private queue on the Web Server is monitored. This is different to monitoring a queue on the same machine.

However the NAS, or indeed the codeunit itself, is unable to run as the Remote Computer is not Available.

I need to know the format of the string to be used in order to access the remote private queue. I get the feeling it is something similar to
DIRECT=TCP:123.123.123.123\private$\queuename or using HTTP.

The method OpenReceiveQueue is called with the paramters 0,0 (protocol and mode), although 1,0 also fails.

Has anyone got any suggestions?
Cheers.
Darren Beetlestone

Comments

  • kinekine Member Posts: 12,562
    1) Check the permissions on the queue, you need to be sure, that your NAS has permissions to read it.
    2) From devguide.chm:
    IMSMQBusAdapter::OpenReceiveQueue
    Opens a queue for receiving messages. If the queue does not exist and the protocol is set to OS, the method tries to create a queue and fails if this is not possible.

    Parameter:
    [In] Name
    The name of the queue in one of the following:

    MachineName\QueueName (OS or PathName)

    IPAddress\QueueName (TCP)

    SPXAddress\QueueName (SPX)

    [In] Protocol
    Refers to the network protocol you must use when you connect to the queue. The options are:

    0: OS (default value) - any machine name supported by the underlying operating system. For Microsoft Windows NT4, it is either UNC or DNS.

    1: TCP (TCP/IP) - Internet address notation (IP address).

    2: SPX - network number and host number (separated by the ":" character).

    [In] Mode
    Reflects the mode in which the queue will be opened. The mode options are:

    0: DIRECT (default value) - see the MSDN Platform SDK (Opening Queues with a Direct Format Name) for further information.

    1: PRIVATE

    2: PUBLIC

    When the protocol contains a value that has no meaning, the default OS protocol is used. When you set Mode to DIRECT, a FormatName (see below) is used. Any other Mode uses a PathName.


    FormatName
    You use direct format names to reference public or private queues without accessing the directory. You can use direct format names when performing the following operations:

    Sending a message directly to a computer.

    Sending a message to computers on the Internet.

    Sending messages in a workgroup environment.

    Reading messages in a workgroup environment.

    The general format of direct format names is shown below. Note that you can directly access public, private and (for MSMQ 2.0 clients and servers) computer system queues.

    FormatName Syntax Examples
    AddressSpecification\QueueName (for public queues)

    AddressSpecification\PRIVATE\QueueName (for private queues)

    AddressSpecification\SYSTEM$,computersystemqueue (introduced in MSMQ 2.0 for computer journal and dead-letter queues)

    157.18.3.1\myQueue (Mode Direct, Protocol TCP)

    elvisp.ms.com\myQueue (Mode Direct, Protocol OS)

    00000012:00a0234f7500\myQueue (Mode Direct, Protocol SPX, supported only on Windows NT4 and Windows 2000)

    More information:

    IMSMQBusAdapter Interface
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • beetlestonebeetlestone Member Posts: 46
    Hey Kine, thanks for at replying.
    The permissions for the queue have been set to Full Control for Everyone, Iusr account, Anonymous so I think this is covered. I cannot give the Nas specific permission because the Nas user is a windows user on the domain, whereas the queues are on a server sitting outside of the domain in the DMZ - so domain objects are not available.

    I have read through those notes in the Devguide and changed each of the properties but no joy.

    I think the solution may lie in MSMQ redirection or even store and forward, but I can't be sure.

    MSMQ seems to be a technical skill in the same way that Networking and Active Directory is, but you know what happens ... Navision Developers tend to have to drive the use of technology and so 'become' the knowledgable ones - thing is it aint worked this time!!!
    Darren Beetlestone
  • kinekine Member Posts: 12,562
    I am not sure, but somewhere I read that the reading queue for NAV must be placed on same PC as NAS is running (but I am not sure if it was about reading the queue or writing into it) - may be it is connected to the fact, that the writing into the queue must reise the trigger, and if the queue is on another PC than NAS, this trigger is not fired. Try to place the queue which you read in NAS to same PC, but in this case you need to solve how to write into it from your server which is outside...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • beetlestonebeetlestone Member Posts: 46
    Kine,
    Writing into the queue when it is on the same computer is ok, it is just the matter of accessing the queue that sits on the other machine.
    A post by BURFAB seemed to have an identical scenario, but he has not replied to a message or a personal message.

    I have scoured Microsoft, MSDN and the net and can't find 'The dummies guide to MSMQ'. This would help me......
    Darren Beetlestone
Sign In or Register to comment.