Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Doing some testing, it looks like if I try and send a message to a queue that the user is denied the "Send Message" permission on, the message that was sent just disappears. It doesn't show up in the dead letter queue, the outgoing queue, or any other place that I have thought to look. Nor does any sort of exception get thrown when sending the message.

What is happening to that message? Is it really just being eaten or is there something I'm missing?

Here is the code I'm using to send the message:

var q = new MessageQueue(@"[ComputerName]\Test"); 
q.Send("foo"); 
share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

By default, MSMQ will discard ALL messages that cannot be delivered for ANY reason. There will be no error messages unless you are sending to a local machine.

Sending to a remote machine, you only have error messages if you cannot put a message in the outgoing queue which won't help with delivery to the remote queue. Sending to a local machine, there is no outgoing queue mechanism and the local queue manager will try to put the message directly into the required queue so you can have error messages.

You need to enable Negative Source Journaling so that a copy of the message is put in the corresponding Dead Letter Queue so you can find out the reason for non-delivery.

Cheers
John Breakwell

share|improve this answer
add comment

In short... if you don't have permissions to send to that queue... you should get an error message returned from whatever method you used to attempt to send the message. If you're not checking for it, the message just gets tossed in the eternal bit-bucket and is not retrievable. Without more information on what you're using to send messages to the queue... I can't even begin to help you troubleshoot your problem.

share|improve this answer
    
I'm using the .Net MessageQueue library and a quick test snippet. –  Dugan Apr 12 '11 at 16:28
    
actually... I meant what code you're using to send messages to the queue... I already assumed it was the .net framework. –  TheCompWiz Apr 12 '11 at 17:27
    
Added to the question –  Dugan Apr 12 '11 at 18:47
    
Have you throw the whole mess in a try block and looked at the resulting exception? Also, remember that you must create the queue if it doesn't already exist. UAC can also interfere with accessing the queue. I have an old VB.net snippet I can paste (if you don't laugh too hard at it... it was for a REALLY old project) –  TheCompWiz Apr 12 '11 at 19:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.