views:

87

answers:

1

Hi all,

I have following problem:

I am trying to log messages to the remote private message queue. To do this I am using Enterprise library 5.0 and msmq trace listener in my application. Unfortunately, I always end up with the following error:

Exception Type: System.Messaging.MessageQueueException MessageQueueErrorCode: IllegalFormatName Message: Format name is invalid. ErrorCode: -2147467259

This is the queue path I am using:

FormatName:Direct=TCP:192.168.1.1\Private$\MyPrivateQueue

1) When I create MSMQ message directly (not using EntLib) and use above mentioned queue path, everything works fine. 2) Also, when I change queue path to local private queue and use EntLib, message is also sent correctly and this is why I am confused.

As I undestand, 1) shows that remote message queue is accessible and queue path is correct and 2) shows that EntLib Logging application block settings are correct.

If anyone has any idea what could be the problem or you need clarification on anything please feel free to comment.

A: 

I found my problem. It appears I was not so careful and wrote this in the config file:

FormatName:Direct=TCP:192.168.1.1\\Private$\\MyPrivateQueue

and it should be like this:

FormatName:Direct=TCP:192.168.1.1\Private$\MyPrivateQueue

So, if anyone had a similar problem, here is the solution

vukashin
Umm, the two strings you posted are identical?
Chris Tavares
My mistake, I have changed it now. Thanks for noticing.
vukashin