Log WCF exceptions to Database

Topics: Logging Application Block
Sep 11, 2012 at 10:56 AM
Edited Sep 11, 2012 at 11:09 AM


As suggested at above url 'WCF service logs exception messages to database when the service is running locally. 


But when the service is migrated to Web server, when the exception occurs the message is not logging to database.

Your help and insight appreciated



Sep 12, 2012 at 12:47 AM

If it is working on one machine but not on another the reason is probably configuration or environment related.  There can be many reasons why it would not be logging.  For example: configuration is not deployed properly, credentials are invalid, firewalls, permissions, deployment issues (database changes are not deployed), etc.

Do you have the errors special source configured for logging?  If there is a failure you should be seeing some messages in that trace listeners destination.

Randy Levy
Enterprise Library support engineer