Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7817379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:12:58+00:00 2026-06-02T06:12:58+00:00

I wrote up a custom MongoDB Listener with Entlib 5.0 as my Exception Handler

  • 0

I wrote up a custom MongoDB Listener with Entlib 5.0 as my Exception Handler in my web app. It works great except for the fact that it creates a document entry for every “line” below, including the empty lines:

----------------------------------------
Timestamp: 4/17/2012 4:13:50 PM
Message: HandlingInstanceID: c3c5f58a-89b3-4b64-b05d-3f72f998bab4
An exception of type 'System.NullReferenceException' occurred and was caught.
-----------------------------------------------------------------------------
04/17/2012 16:13:50
Type : System.NullReferenceException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Object reference not set to an instance of an object.
Source : MyCo.Webservices.TheCoolService
Data : System.Collections.ListDictionaryInternal
TargetSite : System.String TestExceptionHandling()
Stack Trace :    at Logging.TestExceptionHandling() in C:\tfs\Development\Source\MyCo.Webservices.TheCoolService\Logging\Logging.cs:line 55


----------------------------------------

What I’d like to do is throw most of this information into one document so as to not have 10 different documents for the same error. Even writing my own Exception formattter (http://msdn.microsoft.com/en-us/library/ff664587(v=pandp.50).aspx) I still can’t seem to get around the multiple calls to the customlistener.Write() method, each of which creates a new document in my mongodb collection.

My Entlib experience is limited, but I don’t see how to get around it unless I write the whole ExceptionFormatter from scratch. Anybody have any ideas how to get around this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T06:12:59+00:00Added an answer on June 2, 2026 at 6:12 am

    Found my problem. Turns out that I was missing the TraceData() method implementation on my listener. Once I told it what to do there, it handled the error message like a single WriteLine() call.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a custom serializer that works by setting object properties by reflection. Serializable
I wrote a custom error handler for my site and I'm aware that PHP
I wrote custom Twig loader that fetch templates from database and it works in
I wrote a custom web part for SharePoint 2007 that loads an existing user
I wrote a custom security provider for AES/CBC/PKCS5Padding. That works fine. What settings do
I wrote a custom wordpress plugin that is shown in the left menu bar
I wrote a custom PreferenceDialog that includes two TimePickers, an EditText, a few CheckBoxes,
I have an MVC app and I wrote a custom roleprovider for it as
I wrote a custom validation handler for this ASP.NET MVC application. Here is a
For my customer I wrote a custom web-based WYSIWYG HTML editor. It allows them

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.