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

by | Updated August 15, 2016 | Dynamics AX, Performance, User Tips and Tricks

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

  • Since the release of Microsoft Dynamics 365, there have been a lot of rumors around when Microsoft support for Dynamics AX 2009 and Dynamics AX 2012 will end. Microsoft Dynamics AX support…

  • Over on the AX Support site on MSDN, Daniel Durrer has taken the time to keep tabs on the latest builds for Microsoft Dynamics AX 4.0, 2009 and 2012.  I…

  • If you have ever seen someone’s personalized form in AX and it looks a lot more usable than the standard form, there is an easy way to get that personalization.…

3 Comments

  1. syed

    Hi ,

    Saw your article onAX Event Log Message: The description for Event ID from source Microsoft Dynamics AX cannot be found.

    Can I get the script which gathers all the event log in excel.

    Regards

  2. Brandon Carmichael

    Hello Syed:

    Thank you for your interest in our script; however, while we cannot share the entirety of our secret sauce this should give you a pretty good head start.

    #Number of previous days to collect event logs from today
    $startDate = [DateTime]::Today.AddDays(-$Days)
    $endDate = Get-Date
    Write-host “Collecting last $Days days of events”
    $events = Get-WinEvent -ComputerName $server -FilterHashtable @{LogName=’Application,System’; Level=’1,2,3′; StartTime=$startDate; EndTime=$endDate} -ErrorAction SilentlyContinue -WarningAction SilentlyContinue
    $events | Export-Csv “C:\Temp\ServerEvents.csv” -NoTypeInformation

    Thanks,
    Brandon

  3. Mathieu

    Wow, pretty amazing ! Thanks for sharing !

Submit a Comment

Your email address will not be published. Required fields are marked *

Upcoming Events

august

12aug10:00 am10:30 amWhy Levridge Grain? How to Achieve Efficient and Accurate Scale Tickets

12aug12:00 pm1:00 pmThe Three Paths to Dynamics 365 Finance and Supply Chain from Dynamics AX

13aug11:00 am12:00 pmConfab with Stoneridge - Livestream - Inspire Keynote Breakdown

19aug10:00 am11:00 amWhat is Levridge? An Overview of the Ultimate Ag Solution

19aug12:00 pm12:30 pmThe Modern Manufacturer - Death by Safety Stock

27aug12:00 pm1:00 pmConfab with Stoneridge - Livestream - Dynamics 365 2020 Wave 2 Preview

september

02sep10:00 am10:30 amThe Modern Manufacturer - Cycle Count Management

09sep10:00 am11:00 amWhat is Levridge? An Overview of the Ultimate Ag Solution

16sep10:00 am10:30 amThe Modern Manufacturer - Product Lifecycle Management

30sep10:00 am10:30 amThe Modern Manufacturer - Return Management

About Stoneridge
Stoneridge Software is a unique Microsoft Gold Partner, with emphasis on partner. With specialties in Microsoft Dynamics 365, Microsoft Dynamics AX, Microsoft Dynamics NAV, Microsoft Dynamics GP and Microsoft Dynamics CRM, we focus on attracting the most knowledgeable experts in the field to our team, and prioritize delivering stellar solutions with maximum impact for your business. At Stoneridge, we are deeply committed to your results. Each engagement is met with a dedicated team, ready to provide thorough, tailored, and expert service. Based in Minnesota, we intentionally “step into your shoes,” wherever you are. We focus on what you care about, and develop trusting, long-term relationships with our clients.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X