Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / All-Topics

BizTalk Event Log error: The source was not found, but some or all event logs could not be searched.

0.00/5 (No votes)
20 Oct 2011CPOL 24.1K  
How to fix this error

My BizTalk development machine runs on Windows 7. In an orchestration, I'd written System.Diagnostics.EventLog.WriteEntry("Payment Automation", "Instantiated the Process Engine");. When it runs, I got the following error in the event log. But I won't get this in Windows 2003 R2 server.

271578/EvtLog.jpg

Figure 1: Windows Event Log
Event Type: Error
Event Source: XLANG/s
Event Category: None
Event ID: 10034
Date:  8/26/2010
Time:  9:27:29 AM
User:  N/A
Computer: 
Description:
Uncaught exception (see the 'inner exception' below) has suspended 
  an instance of service 'Brandix.EAI.Orchestration.PaymentAutomation.
  BrandixPaymentAutomation(7e9e7bc9-558e-8988-7478-6552f648a021)'.
The service instance will remain suspended until 
  administratively resumed or terminated. 
If resumed the instance will continue from its last persisted state 
  and may re-throw the same unexpected exception.
InstanceId: b4472198-88f8-458f-aee3-aaa272d327ee
Shape name: Event Log Entry
ShapeId: 33391213-fc37-4d3a-91d7-f5f7bd50b667
Exception thrown from: segment 3, progress 3
Inner exception: The source was not found, but some or all 
  event logs could not be searched.  Inaccessible logs: Security.
        
Exception type: SecurityException
Source: System
Target Site: Microsoft.Win32.RegistryKey 
  FindSourceRegistration(System.String, System.String, Boolean)
The following is a stack trace that identifies 
  the location where the exception occurred

To avoid this error, we have to do the following steps:

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\EventLog\Application
  1. Run RegEdit.exe
  2. Expand hives to the level of the following:
  3. Insert a new key to the Application hive, in this case "Payment Automation".
  4. Insert a new String value called "EventMessageFile" under the "Payment Automation".
  5. Double click on "EventMessageFile" set Value Data as "C:\Windows\Microsoft.NET\Framework\v2.0.50727\EventLogMessages.dll".

Final Windows Registry editor view will look like this:

271578/RegEdit.jpg

Figure 2: Windows Registry Editor

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)