System.Diagnostics.EventLog.WriteEntry("Payment Automation","Instantiated the Process Engine");
When it runs, i can see following error in the event log. But I wont get this in Windows 2003 R2 server.
|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 occured
To avoid this error we have to do following steps.
- Run RegEdit.exe
- Expand hives to the level of following
- Insert a new key to the Application hive, in this case "Payment Automation"
- Insert a new String Value called "EventMessageFile" under the "Payment Automation"
- Double click on "EventMessageFile" set Value Data as "C:\Windows\Microsoft.NET\Framework\v2.0.50727\EventLogMessages.dll"
|Figure 2: Windows Registry Editor|