Can I change who MSMQ (.Net CF) will accept messages from?

S

Scott

I have an application (.Net CF 2) on Symbol MC9090 that sends multicast UDP
packets that are detected by XP desktops who then respond by sending an MSMQ
message back to the device. There are two desktops but only one of them has
their reply message received on the device - on the other, the message sits
in the outgoing queue until it expires.

All equipment is on the same subnet. Messages are send using the IP address
eg, "FormatName:DIRECT=TCP:192.168.0.1" etc.

The reason I ask if it's possible to change who MSMQ will acept messages
from is because both PCs will have their message received if the sending
PC's IP address is entered into the device's registry under
HKLM\Comm\Tcpip\Hosts. Since this is intended to discover hosts, having
their IP address first sort of defeats the purpose.
 
J

John Breakwell \(MSFT\)

Hi Scott,

Looking at:

Microsoft Windows CE 3.0 - Parameters Configurable Using the Registry Editor
http://msdn2.microsoft.com/en-us/library/ms881801.aspx

Key: Comm\Tcpip\Hosts

Description: This value stands for the name of a host, and is a subkey that
contains three values: ExpireTime, ipaddr, and aliases. The registry is
queried first when an application calls gethostbyname, before a DNS or WINS
request is sent. If the host name is found in the registry, the registry
values are returned.


Editing the HOSTS is the old technique for name resolution. This therefore
implies to me that the Symbol device cannot correctly resolve the IP address
using gethostbyname() of one of the machines that is sending it a message. I
would expect to see that the DNS/WINS entries do NOT match the HOSTS entry
you added. Fix that and the problem will go away.

Is it a transactional message from the desktop? If so then the message can
only leave the sender when the desktop and Symbol device have exchanged
acknowledgement messages to ensure the transactional delivery commits
properly. It's probably here that the issue arises - the Symbol device must
be performing name resolution to get the acknowledgement sent but the IP
address it is given by DNS is incorrect.

Cheers
John Breakwell (MSFT)
 
S

Scott

Hi John,
Much thanks for the reply.

It's not a transactional message & it's sent using the IP address rather
than the device name. Interestingly, so long as I add the ipaddr value to
the Hosts key, I can give it ANY value for Name & it will still work. So
rather than looking up the name, it is therefore, looking up the IP address
to find the IP address. Since this seems rather pointless, I'm wondering if
I can just bypass the process.

I'm guessing that the problem is either the exchange of ACKs or that
internally MSMQ.CF uses DNS/WINS to determine the scope of its socket
permissions.

Also interesting is that in an earlier version of Philipp Gassmann's
PocketPing (http://go.to/dy), if I pinged the PC without the host entry, it
came back with the message "Invalid host name". The current version (1.6)
pings successfully.

Thanks for your interest,
Scott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top