Setting up Error Logging for Dynamics 365 Portals

Jordan Hohepa, 23 April 2019


Recently one of our clients ran into issues with the Dynamic 365 Portal. As we were attempting to find a solution to the issues they were receiving we came across the error message shown in the below screenshot. As you can see, this is a very generic error and doesn’t provide us with much information. It was at this point that we decided to set up error logging for the Portal.

image

Error logging for the Portal can be setup through the Dynamics 365 Administration Center. To get here you can navigate to the Applications tab and select to Configure your Dynamics 365 Portal. Once the portal configuration page has opened you can navigate to the Portal Actions area and select Enable Diagnostic logging.

image

Once you’ve selected this option the screen below will prompt you to provide the connection of an Azure Blob Storage account. This Azure Blob Storage account will be the location that the error log files will be stored. Once you’ve entered a valid Connection String and selected a retention period, which will be how long the log files last before being cleaned, you can click Configure to enable logging.

image

Now once you receive generic errors in the Dynamics 365 Portal you will be able to navigate to the Blob Storage account that you’ve connected and view more detailed error logs. An example of a log I had received when reproducing the error in the first screenshot can be seen below.

“SourceFilePath:G:\Agents\BA4504\_wap\12\s\Framework\Adxstudio.Xrm\Threading\FluentSchedulerJob.cs, SourceLineNumber:75, ExceptionMessage:Object reference not set to an instance of an object.
System.NullReferenceException
at Adxstudio.Xrm.EventHubBasedInvalidation.EventHubJob.ExecuteInternal(Guid id) in G:\Agents\BA4504\_wap\12\s\Framework\Adxstudio.Xrm\EventHubBasedInvalidation\EventHubJob.cs:line 77 
at Adxstudio.Xrm.Threading.FluentSchedulerJob.Execute() in G:\Agents\BA4504\_wap\12\s\Framework\Adxstudio.Xrm\Threading\FluentSchedulerJob.cs:line 50”