AX Event Log Message: The description for Event ID from source Microsoft Dynamics AX cannot be found

By Josh Lee | December 3, 2015

Ax event log message: the description for event id from source microsoft dynamics ax cannot be found

As part of the Dynamics AX Health Check service that we offer, we review the Microsoft Dynamics event log messages. There is a lot of useful information that can be harvested from these logs. I have a PowerShell script that captures the messages on all the servers we review and writes the events into a .csv file for reviewing in Excel. An issue that I’ve noticed on a few clients that I’ve performed Health Checks on were that some of the event messages for the Microsoft Dynamics AX provider were missing. You may have seen this in your own event logs before where <Event ID> varies:

“The description for Event ID <Event ID> from source Microsoft Dynamics AX cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.”

Event ID Cannot be Found

 

This has been a thorn in my side for a while as the Get-WinEvent cmdlet I use in my PowerShell script wasn’t returning any messages for this event. Here is an example from the .csv file that my script creates and as you can see the Type and Message columns are blank:

Microsoft Dynamics AX

When the events are properly populated this is what it would normally look like (message truncated for brevity):

Microsoft Dynamics AX

Initially I set out in PowerShell to get around this annoyance. What I learned was rather interesting if not frustrating. If I changed my script to use the Get-EventLog cmdlet, it returned the message:

“Microsoft Dynamics AX Business Connector Session 7.
Could not load assembly ‘TillLayoutDesigner, Version=6.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies.”

The problem with this approach however is that Get-EventLog doesn’t have the ability to return Critical events like Get-WinEvent does among other things.  Overall Get-WinEvent log is better (IMHO) which you can read more about here if interested –  http://blogs.msdn.com/b/powershell/archive/2009/06/11/windows-event-log-in-powershell-part-ii.aspx.  Also, since I already had it in my script, I didn’t want to make a lot of edits so I decided to investigate this further and see if I could resolve the error so that the information was correctly populated. It wasn’t missing per se as if you check on the Details tab you could get the information from there:

Microsoft Dynamics AX Error

I did some research on the Windows Event Log to get a little more background on how it works.  This link Windows Event Log was very informative although I did have to click around on a lot of different links to piece together a full understanding.

In a nutshell what I gathered was:

  1. Applications don’t log event messages directly to the event log
  2. Applications use event message Files
  3. The event message file contains a list of the events with place holders that the application populates
  4. Event message files are either contained in a .dll or in the application .exe

 

For example Dynamics AX would log a message to the Windows Event Viewer like this if it was written in C# (it most likely ties into some .Net framework assembly but I didn’t want to figure that out):

EventLog.WriteEntry(sSource, sEvent, EventLogEntryType.Informational193);

Notice that the event message (Microsoft Dynamics AX Business Connector Session 7. Could not load assembly ‘TillLayoutDesigner, Version=6.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies) is not included.

An event message file would look something like this, which I grabbed from https://msdn.microsoft.com/en-us/library/windows/desktop/dd996906(v=vs.85).aspx:

MessageId=0x1

Severity=Error

Facility=Runtime

SymbolicName=MSG_BAD_COMMAND

Language=English

You have chosen an incorrect command.

Language=Japanese

<Japanese message string goes here>

 

I figured I was left with the following possibilities:

  1. The event message file was missing for the Microsoft Dynamics AX
  2. The event message file was incorrectly/not configured for the Microsoft Dynamics AX provider.

 

I didn’t know what event message file Dynamics uses so I went to the registry to figure it out. I went to the Application Event log to review the Microsoft Dynamics AX provider log and was surprised to find it didn’t exist!  The event log location is: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application and as you can see below, there isn’t a Microsoft Dynamics AX provider.

Microsoft Dynamics AX

 

I looked at the other Dynamics providers to get a feel for their structure:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\Dynamics .NET Business Connector 6.0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\Dynamics AX Services
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\Dynamics AX Services (IIS)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\Dynamics Client
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\Dynamics Server 01
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\Microsoft Dynamics AX – AXUtil
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\Microsoft Dynamics AX Services Client

 

Notice there were 4 different event message files being used (there may be others, this is just what I observed)

1. AX32.exe for the client
2. EventLogMessages.dll for AX Services
3. AX32serv.exe for the server
4. Microsoft.Dynamics.BusinessConnectorNet.dll for the business connector

I figured the reason for the message, “The description for Event ID 193  from source Microsoft Dynamics AX cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer,” was that there wasn’t a provider in the event log registry listed. I don’t know how it was managing to provide the message information it was, I’m just assuming there is a default message file it falls back on. I also didn’t know which message file to use so I played around in my environment to figure it out.

I first tried to fix the issue by using the C:\Windows\Microsoft.NET\Framework64\v2.0.50727\EventLogMessages.dll message file. This is initially what I did:

  1. Create a new key under the Application log – HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\Microsoft Dynamics AX
  2. Create a new String Value property with the name of EventMessageFile
  3. Populate the EventMessageFile property with the value of C:\Windows\Microsoft.NET\Framework64\v2.0.50727\EventLogMessages.dll

 

It looked like this:

Registry Editor in Dynamics AX

As soon as I created this key and went back to the event viewer (after refresh) the error was gone and the part of the text was there.

Microsoft Dynamics AX Business Connector Session 7

I noticed that the error message wasn’t appearing completely as when I viewed the details tab I saw all of the error message:

Microsoft Dynamics AX Error

I decided to change the EventMessageFile property from:

C:\Windows\Microsoft.NET\Framework64\v2.0.50727\EventLogMessages.dll

to the following:

C:\Program Files (x86)\Microsoft Dynamics AX\60\\Client\Bin\Ax32.exe

 

The key/value looked like this now:

Registry editor

 

SUCCESS! When I refreshed event viewer again, this is what I saw:

Microsoft Dynamics AX Business Session 7

The only remaining thing I have left to do is to update my script to check for this missing key and populate it if it is missing.  This way I won’t have to worry about missing the error messages anymore! I do admit I am still pondering how this came about but since I’ve seen this issue at so many clients I’m left to believe it’s some type of Dynamics bug.  Figuring out the root cause sounds like an idea for another blog.

 

I hope you enjoyed and found this helpful!

Related Posts

Recommended Reading:

Manage U.S. Use Tax on Purchase Orders in Dynamics 365 Finance and Operations

  Managing sales tax requirements on your business purchase can be complicated, but Dynamics 365 Finance and Operations can help […]

Read the Article
5.19.22 Dynamics CRM

How to Write a Great Support Ticket in the Stoneridge Support Portal

Submitting a support ticket through the Stoneridge Support Portal is a quick and effective way to get assistance for any […]

Read the Article

Managing Your Business Through Uncertain Times Using Dynamics 365 Finance and Operations

  Dynamics 365 Finance and Operations (F&O) can help you make informed decisions on how to move your business forward. […]

Read the Article
5.13.22 Power Platform

Using Power BI Object Level Security

  The following article will demonstrate how to use Power BI Object Level Security to disable column data based on […]

Read the Article
5.12.22 Dynamics CRM

How to Use the Stoneridge Support Portal

Stoneridge Software’s support portal is an intuitive and useful function that makes it easy for you to access resources to […]

Read the Article
5.6.22 Dynamics GP

Dynamics GP Transaction Removal: Purchase Orders

  Are you having performance issues with Purchase Orders?  Do you find that there are old Purchase Orders on your […]

Read the Article
5.5.22 Dynamics GP

The Real Story about the Long-Term Future of Dynamics GP Support

I’ve seen a number of people put forward comment that Dynamics GP is going away and you have to get […]

Read the Article

New Features in Dynamics 365 Business Central 2022 Wave 1 Release – Financial Enhancements

The Dynamics 365 Businses Central 2022 Wave 1 Release has a lot of new and exciting features to help your […]

Read the Article
4.29.22 Dynamics GP

Dynamics GP Transaction Removals: Bank Reconciliation

  This is part 2 of a 3 part series on Dynamics GP Transaction Removals. These quick tips will hopefully […]

Read the Article

Start the Conversation

It’s our mission to help clients win. We’d love to talk to you about the right business solutions to help you achieve your goals.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X