Enterprise Library 5.0 exception logging not logs in event log

Topics: Exception Handling Application Block, Logging Application Block
Mar 16, 2011 at 11:36 AM
Edited Mar 16, 2011 at 11:37 AM

I am using Enterprise Library 5.0 to log the Exceptions in windows event log. In my development machine everything works perfect. When i moved the code to the stage server the exceptions are not logged in Event Log and also the code doesnt throw any error. I checked all the permissions and everything is same like my development. Please help me to solve this.

Thanks,

Kadiresan

Mar 17, 2011 at 1:22 AM

Did you check the permission to write to the event viewer as well?  That seems to be the problem.  In addition, you can configure a trace listener (use flat file) under the Logging Errors and Warnings special category so that any failure during logging will get logged using that trace listener.

 

Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com

Mar 17, 2011 at 1:57 PM
I am using another server also with the similar kind of settings and there the event log is working. Also i checked with the Flat file trace Listener and it also not adding any exception. While debugging the code pass without any error. Send me some help on this.

Thanks,
Kadiresan


From: [email removed]
To: [email removed]
Date: Wed, 16 Mar 2011 17:22:08 -0700
Subject: Re: Enterprise Library 5.0 exception logging not logs in event log [entlib:249905]

From: AvanadeSupport
Did you check the permission to write to the event viewer as well? That seems to be the problem. In addition, you can configure a trace listener (use flat file) under the Logging Errors and Warnings special category so that any failure during logging will get logged using that trace listener.

Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com

Read the full discussion online.
To add a post to this discussion, reply to this email (entlib@discussions.codeplex.com)
To start a new discussion for this project, email entlib@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Mar 18, 2011 at 1:46 AM

When you say similar kind of settings, what settings are you specifically referring to?  Did you check that the event log (as specified in the Log property of the Event Log Trace Listener) exists in that machine and the source name (Source Name) is registered in that log?  You could refer to this FAQ item and see if it helps you.

By the way, are you able to debug in your stage server?  If yes, you can try debugging through the EntLib code itself.  For information how to do this, refer to this thread.

 

Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com

Mar 18, 2011 at 5:43 PM

Make sure that the Title field of the Exception Handlers match the name of event source that you've registered.  That was my problem.

It's too bad that there is no error when attempting to write to the event log. 

Mar 29, 2011 at 6:07 AM

The title field of the Logging Exception Handler doesn't affect logging to the event viewer, it doesn't correspond to an event source.  What corresponds to an event source is the Source Name property of an event log trace listener.

 

Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com

Aug 3, 2011 at 12:20 PM

I am facing a similar issues. I am using EntlIb 5.0 for logging in my windows application. It logs fine when i run the code. But when i create the installable and run it, it creates the log file but does not write anything to the log file. I tried running the exe with Run as administrator . Also added the manifest file with requireadministrator option. But it doesnt help. When i look at the event viewer i can see the following error:

Activation context generation failed for "C:\Windows\system32\conhost.exe". Dependent Assembly Microsoft.Windows.SystemCompatible,processorArchitecture="x86",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.7600.16816" could not be found. Please use sxstrace.exe for detailed diagnosis.

Aug 3, 2011 at 2:49 PM

Hi,

I'm not sure but the error seems not related to EntLib at all as what I've found on this link. Can you double check if this is the exact exception?

 

Noel Angelo Bolasoc
Global Technologies and Solutions
Avanade, Inc.
Contact Us

Aug 4, 2011 at 5:15 AM
Hi,
Thanks a lot for the reply. The issue got resolved after installing the service pack.

Regards,
Madhuri.
On Wed, Aug 3, 2011 at 7:19 PM, AvanadeSupport <notifications@codeplex.com> wrote:

From: AvanadeSupport

Hi,

I'm not sure but the error seems not related to EntLib at all as what I've found on this link. Can you double check if this is the exact exception?

Noel Angelo Bolasoc
Global Technologies and Solutions
Avanade, Inc.
Contact Us

Read the full discussion online.

To add a post to this discussion, reply to this email (entlib@discussions.codeplex.com)

To start a new discussion for this project, email entlib@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com