Email Trace Listener not working

Topics: Logging Application Block
Feb 9, 2012 at 8:43 PM

I have test client (ASP.NET basic website) and a WCF web service. I have made a wrapper assembly for the enterprise library logging. The wrapper will read the config files from the test client and WCF service and configure the logging as needed. Well I am trying to use the Email Trace Listener and it doesn't seem to be working right in the WCF service. When I run it through the test client, it works just fine... but no email gets sent when it hits the WCF service. Does anyone know why this is happending?


Feb 11, 2012 at 4:35 AM

Is the WCF web service hosted in IIS?  Does the WCF service use the configuration from web.config?  

What if you change your WCF logging configuration to use a different trace listener to see if logging is occuring?  For testing you could try using Event Log Trace Listener using Application log and "Application" as the event source name (that should hopefully avoid any permission problems since those registry keys should already be configured).  If the message is logged by the WCF service in the Event Log then it would look like the issue might be some sort of permission or networking issue since the Email Trace Listener settings were validated when sending an email with the the test client.

Randy Levy
Enterprise Library support engineer