BinaryLogFormatter not writing to MSMQ on Windows 7

Topics: Logging Application Block, Policy Injection Application Block
Oct 19, 2010 at 7:47 PM

I am having a trouble using LAB in order to write messages to MSMQ on Windows 7.  I am planning on using policy injection and unity interception in order to log trace messages and errors into a central queue for the Distributor Service to then write off to a central data store.  I have the web.config configured through the EntLib config tool for policy injection and logging.  I can get messages to the queue provided they use the text formatter but when I change to use the binary formatter the messages never arrive in the queue.

I have done some searching but I have not been able to arrive at a solution to the problem.  Everything arrives at the queue until I use the BinaryLogFormatter.  I have also tested a coded solution using .net (not through entlib) and I can send messages to my queue using the .net binary formatter.  So everything seems to be good with the queue, however entlib is unable to send binary messages there.



Oct 19, 2010 at 9:14 PM


MSMQ Trace Listener was tested on Windows 7.

Have you looked at ?

- Grigori

Oct 19, 2010 at 9:58 PM

Thanks Grigori!

I did look at this link as well.  I think I am narrowing down the problem a little.  The project is an MVC 2 project and I am using DI and Interception.  I can get the binaryformatter to send messages to the queue in other examples on windows 7 including the following; WinForms, ASP.Net, ASP.Net MVC2 (no DI or interception).  I am now working up an example using MVC 2, DI and interception.  I believe the problem is some how related to that particular scenario.  Very strange that the textformatter would be able to send a message to the queue but not the binary formatter in that scenario.



Oct 19, 2010 at 10:58 PM

It seems to be functioning now, even with DI and interception.  Works both in my sample project and in the real project.  Really not sure what the issue was, didn't change any code on the real project.  It just started working with the binary formatter.