Msmq TraceListener and Distribiuted ...

Jul 3, 2008 at 4:03 PM
Hi!
First what I am doing:
I have installed Msmq on XP,It works.
I have created a private queue named entlib and could send messages to it by a test program,it works.
I have created a test program, it uses Msmqtracelistener and distributed ... ,it works.
now from another computer I can send messages to the queu,it works.
When I try to run Logging test program from another computer using Msmglistener no message arrives to the queue!
What can be wrong?
Some code I use:

<

loggingConfiguration name="Logging Application Block" tracingEnabled="true"

 

 

defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">

 

<

listeners>

 

<

add name="Msmq TraceListener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.MsmqTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

 

 

listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.MsmqTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

 

 

traceOutputOptions="None" filter="All" queuePath="FormatName:DIRECT=OS:SDFG-ADB0F0DFFB\private$\entlib"

 

 

formatter="Binary Formatter" messagePriority="Normal" timeToReachQueue="49710.06:28:15"

 

 

timeToBeReceived="49710.06:28:15" recoverable="false" useAuthentication="false"

 

 

useDeadLetterQueue="false" useEncryption="false" transactionType="None" />

 

</

listeners>

 

<

formatters>

 

<

add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.BinaryLogFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

 

 

name="Binary Formatter" />

 

<

add template="Timestamp: {timestamp}&#xD;&#xA;Message: {message}&#xD;&#xA;Category: {category}&#xD;&#xA;Priority: {priority}&#xD;&#xA;EventId: {eventid}&#xD;&#xA;Severity: {severity}&#xD;&#xA;Title:{title}&#xD;&#xA;Machine: {machine}&#xD;&#xA;Application Domain: {appDomain}&#xD;&#xA;Process Id: {processId}&#xD;&#xA;Process Name: {processName}&#xD;&#xA;Win32 Thread Id: {win32ThreadId}&#xD;&#xA;Thread Name: {threadName}&#xD;&#xA;Extended Properties: {dictionary({key} - {value}&#xD;&#xA;)}"

 

 

type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

 

 

name="Text Formatter" />

 

</

formatters>

 

<

categorySources>

 

<

add switchValue="All" name="General">

 

<

listeners>

 

<

add name="Msmq TraceListener" />

 

</

listeners>

 

</

add>

 

</

categorySources>

 

<

specialSources>

 

<

allEvents switchValue="All" name="All Events">

 

<

listeners>

 

<

add name="Msmq TraceListener" />

 

</

listeners>

 

</

allEvents>

 

<

notProcessed switchValue="All" name="Unprocessed Category">

 

<

listeners>

 

<

add name="Msmq TraceListener" />

 

</

listeners>

 

</

notProcessed>

 

<

errors switchValue="All" name="Logging Errors &amp; Warnings">

 

<

listeners>

 

<

add name="Msmq TraceListener" />

 

</

listeners>

 

</

errors>

 

</

specialSources>

 

</

loggingConfiguration>

and:

 

 

LogEntry log = new LogEntry();

 

log.EventId = 300;

log.Message = textBox1.Text;

log.Categories.Add(

"General");

 

log.Severity =

TraceEventType.Error;

 

log.Priority = 5;

 

Logger.Write(log);



Again it works local but från another computer _which i can send plain msmq message to the queue- it does not send any log entry.

Regards

 

Jul 4, 2008 at 3:16 PM
Hi,

Have you monitored the queue, or try to post messages to it directly? It might be a permissions issue.

Fernando
Jul 4, 2008 at 5:31 PM


fsimonazzi wrote:
Hi,

Have you monitored the queue, or try to post messages to it directly? It might be a permissions issue.

Fernando


 have created a private queue named entlib and could send messages to it by a test program,it works.
I have created a test program, it uses Msmqtracelistener and distributed ... ,it works.
now from another computer I can send messages to the queu,it works.
When I try to run Logging test program from another computer using Msmglistener no message arrives to the queue!
Apr 13, 2009 at 1:24 PM
Hi,
Did u find out a way to resolve this.
I'm facing the same issue.
I'm able to log messages to a queue, on a remote machine, using a sample program.
But when I use LAB, nothing goes to the queue. Also the LAB does not throw any exception.

Regards,
Abhijeet.
Apr 14, 2009 at 3:01 AM
Hi, just found this blog - http://mvwood.com/blog/321/

Hope this helps.


Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com