Skip to main content

How to Resolve DVT Script Issues When Applying Quality Updates in LCS for D365FO

 While applying Quality Update 10.0.46 in a Dynamics 365 Finance and Operations (D365FO) environment through Lifecycle Services (LCS), you may encounter an error related to the DVT script during the servicing process. One common error message is:



DVT script for service mode: AOSService on machine.”

            When you dig into the logs, you might also see the following detailed exception:

ERROR: System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

            This issue generally indicates that the SSL certificates used by the environment are either expired,                 invalid, or out of sync—causing trust failures during communication.

            Fortunately, the fix is straightforward. Below are the steps that resolved the issue.

Step 1: Abort the Current Servicing Operation

If your environment is currently stuck in a failed or partially completed servicing state, the first thing you must do is abort the running process.

🔹 Note: The “Abort” option is only available when the environment is in the Deployed state.
If it’s in a Servicing or Failed state but still shows the abort option, you may proceed.

To do this:

  1. Go to your environment in LCS.
  2. Open the Environment details page.
  3. Choose Abort from the available options.

This will stop the failed update and bring your environment back to a stable deployed state.

Step 2: Rotate SSL Certificates in LCS

Since the issue is tied to SSL/TLS trust failures, the fix is to rotate the environment's SSL certificates. This refreshes all required secrets, including the certificates used by D365FO services.

Here’s how:

  1. On the same Environment details page in LCS, go to Maintain.
  2. Select Rotate secrets.
  3. Choose the option:
    • Rotate the SSL certificates
  4. Confirm the action.


LCS will now generate and apply new certificates for the environment. This process may take some time, depending on the size and configuration of the environment.

After Rotation: Reapply the Update

Once the secrets rotation completes:

  • Retry applying the Quality Update.
  • The DVT script should now execute successfully.
  • The SSL/TLS trust issue should be resolved.

Conclusion

This SSL/TLS trust error during DVT script execution is surprisingly common when certificates expire or become invalid. Rotating secrets—specifically SSL certificates—resolves the trust issue and ensures smooth communication between services.

This simple two-step process can save hours of troubleshooting and get your D365FO environment back on track quickly.

Comments

Popular posts from this blog

Fixing the “Can’t Stop DynamicsAxBatch” Error During Admin User Provisioning in Dynamics 365 F&O

 If you're working with Microsoft Dynamics 365 for Finance and Operations (D365 F&O) and encounter the dreaded error “Can’t stop DynamicsAxBatch” while using the Admin User Provisioning Tool , you're not alone. This guide walks you through a quick and effective solution to resolve the issue and get back to work without delays. 🛠️ What Is the Admin User Provisioning Tool? The Admin User Provisioning Tool is used to register a user as an administrator on a D365 F&O instance—typically for development and customization purposes. You provide your Azure AD credentials (email address) to gain admin access. ❌ The Problem: “Can’t Stop DynamicsAxBatch” Error While registering via the Admin Provisioning Tool or attempting to stop the service manually through Windows Services , you might encounter an error stating: “Can’t stop DynamicsAxBatch” This error prevents you from proceeding with the registration process.  The Solution: Step-by-Step Fix  Step 1: Try Stoppi...

How to get batch header and recurrence information in service class for sysoperation frame work in D365 F&O

  BatchHeader batchHeader         = this.getCurrentBatchHeader();         int         timeUnitsSelected   = 0;         if(this.isExecutingInBatch())         {             RefRecId batchRecId = batchHeader.parmBatchHeaderId();             BatchJob batchJob;             select firstonly batchJob             where batchJob.RecId == batchRecId;                      SysRecurrenceData recurrenceData = batchjob.recurrenceData;             SysRecurrenceUnit timeUnits = conPeek(recurrenceData, 7);             timeUnitsSelected = timeUnits;         }

Table Keys: Surrogate, Alternate, Replacement, Primary, and Foreign

Primary key A primary key is one type of key. The other type of key is an alternate key. There is a maximum of one primary key per table , whereas a table can have several alternate keys . The primary key is usually the type of key that other tables, called child tables, refer to when a foreign key field in those other tables need a relational identifier. Starting in Microsoft Dynamics AX 2012 the primary key for every new table is always enforced by an index that has exactly one field. The one field is usually an incremented number or a completely meaningless number that is generated by the system. For new tables the default is a primary key based on the RecId field. This is represented as the surrogate key in the user interface. The following table describes the  PrimaryIndex   property and other major properties that are related to keys. Property Description PrimaryIndex The drop-down list contains the surrogate key plus every index on the table that has its  Alternate...