FIX: EventLog.WriteEntry Method May Fail Under Stress

Article translations Article translations
Article ID: 321563
This article was previously published under Q321563
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

Symptoms

When you write to an event log from a .NET application, you may receive the following error message if the application is under heavy load:
System.ApplicationException: Access is denied.
The call stack trace appears as follows:
at System.Threading.Mutex.CreateMutexNative(Boolean initialState, String name, Boolean& createdNew)
   at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
   at System.Diagnostics.SharedUtils.EnterMutex(String name)
   at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
   at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category)
   at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID)
   at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type)
   at System.Diagnostics.EventLog.WriteEntry(String message)
					

Resolution

To resolve this problem, obtain the latest service pack for Microsoft .NET Framework. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
318836 INFO: How to Obtain the Latest .NET Framework Service Pack
The English version of this fix should have the following file attributes or later:
   Date         Time    Version          Size        File name
   ------------------------------------------------------------
   17-Apr-2002  23:53   1.0.3705.252     1,163,264   System.dll
				

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft .NET Framework Service Pack 2 (SP2).

Properties

Article ID: 321563 - Last Review: October 26, 2013 - Revision: 4.0
Keywords: 
kbnosurvey kbarchive kbhotfixserver kbqfe kbbug kbfix kbnetframe100presp2fix kbnetframe100sp2fix KB321563

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