EL 6 not working on server for anything other than file trace listener

Topics: Enterprise Library Core
Jun 12, 2013 at 6:16 PM
Edited Jun 12, 2013 at 7:47 PM

I have configured and tested the EL 6 exception handling & logging on my local machine and everything is working fine (writing messages to EventLog, File & MSMQ)). But when I deploy this on a server with Windows Server 2008 R2 and run the same test application, nothing happens for trace listeners other than File. There are no errors in EventLog and nothing logged in MSMQ. I am running the test application as an administrator so not sure what is the issue here.

How do I even begin to debug the issue?

Jun 12, 2013 at 8:06 PM
Do you have the errors special source configured? You mention that you have file based listeners working. I would set up the errors special source to point to a file in a location known to have correct permissions. When you run the application again any errors should appear in this file.

For the EventLog, the issue is almost always permissions. If you are creating a custom Event Source (which is usually the case) then administrator permissions are required to create the Event Source. See http://msdn.microsoft.com/en-us/library/x7y6sy21.aspx .

You can also use Process Monitor to try to find permission issues for the Registry.

Randy Levy
Enterprise Library support engineer
Support How-to
Jun 13, 2013 at 12:41 AM
Edited Jun 13, 2013 at 12:42 AM
Hi Randy,

Your suggestion worked. By writing the Special Source for errors configured to write to a file, I was able to get following error with MSMQ logging. I have never seen this error so if you have any suggestions on what could be the issue, please let me know.

Exception Type: System.Messaging.MessageQueueException
MessageQueueErrorCode: NoInternalUserCertificate
Message: User's internal Message Queuing certificate does not exist.
ErrorCode: -2147467259
Data: System.Collections.ListDictionaryInternal
TargetSite: Void SendInternal(System.Object, System.Messaging.MessageQueueTransaction, System.Messaging.MessageQueueTransactionType)
Source: System.Messaging
StackTrace Information Details:
at System.Messaging.MessageQueue.SendInternal(Object obj, MessageQueueTransaction internalTransaction, MessageQueueTransactionType transactionType)
at System.Messaging.MessageQueue.Send(Object obj, MessageQueueTransactionType transactionType)
at Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.MsmqSendInterface.Send(Message message, MessageQueueTransactionType transactionType)
at Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.MsmqTraceListener.SendMessageToQueue(LogEntry logEntry)
at Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.MsmqTraceListener.TraceData(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, Object data)
at Microsoft.Practices.EnterpriseLibrary.Logging.LogSource.TraceData(TraceEventType eventType, Int32 id, LogEntry logEntry, TraceListenerFilter traceListenerFilter, TraceEventCache traceEventCache, ReportTracingError reportError)