FIX: An application that monitors event log entries crashes when it calls the Dispose method of the System.Diagnostics.EventLog class

Article translations Article translations
Article ID: 967613 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

You have a Microsoft .NET Framework 2.0 Service Pack 2 (SP2)-based application or Microsoft .NET Framework 3.5 Service Pack 1 (SP1)-based application. This application monitors event log entries. When the application calls the Dispose method of the System.Diagnostics.EventLog class to release the resources that are used by the event log, the application crashes. Additionally, if you debug the application, you receive an ObjectDisposedException exception and the following error message:
Cannot access a disposed object.

Object name: 'EventLog'

CAUSE

This problem occurs when the EventLog object is disposed of before all callback functions are completed. Therefore, in some cases, the ObjectDisposedException exception is thrown and the application crashes.

RESOLUTION

Hotfix Replacement Information

The hotfix that corresponds to KB967613 has been superseded with the hotfix KB981574, which contains all fixes that were previously included in KB967613. You should use the hotfix KB981574 to fix the issues described in KB967613. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
981574 The splash screen stays open longer than usual when you try to start Excel on a computer that has the .NET Framework 3.5 SP1 installed

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Properties

Article ID: 967613 - Last Review: August 4, 2010 - Revision: 4.0
APPLIES TO
  • Microsoft .NET Framework 3.5 Service Pack 1
  • Microsoft .NET Framework 2.0 Service Pack 2
Keywords: 
kbHotfixServer kbexpertiseadvanced kbqfe kbsurveynew KB967613

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com