web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Retargeting failed

(0) ShareShare
ReportReport
Posted on by 310

trying to apply re-provisioning tool manually on a Local VHD, getting error

i even added to the connection string TrustServerCertificate=True, also at SQL instance trust server certificate checkbox is checked,

still issue persists

2020_2D00_04_2D00_23_5F00_093325.png

 stack trace from error log

Redirecting to Retail Retargeting Tool V2
2020-04-23T09:12:49 : Retail Retargeting Tool - V2 . Last Updated Date: 2019-03-12.
2020-04-23T09:12:50 : Retail Retargeting Tool - GetRetailRetargetingConfiguration - V2 . Last Updated Date: 2018-12-28.
2020-04-23T09:12:50 : Checking HKLM:\SOFTWARE\Microsoft\Dynamics\7.0\RetailSelfService\Servicing for app insights keys.
2020-04-23T09:12:50 : Retail Servicing registry key HKLM:\SOFTWARE\Microsoft\Dynamics\7.0\RetailSelfService\Servicing found, using app insights keys from registry.
2020-04-23T09:12:50 : Done with extracting app insights keys from registry.
Opening connection to localhost/AxDB with user axdeployuser
2020-04-23T09:12:50 : Retargeting failed
2020-04-23T09:12:50 :
PSMessageDetails :
Exception : System.Management.Automation.MethodInvocationException: Exception calling "Open" with "0"
argument(s): "A connection was successfully established with the server, but then an error
occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain
was issued by an authority that is not trusted.)" ---> System.Data.SqlClient.SqlException: A
connection was successfully established with the server, but then an error occurred during the
login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an
authority that is not trusted.) ---> System.ComponentModel.Win32Exception: The certificate
chain was issued by an authority that is not trusted
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity,
SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String
newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance,
SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool
pool, String accessToken, Boolean applyTransientFaultHandling,
SqlAuthenticationProviderManager sqlAuthProviderManager)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options,
DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool
pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey,
DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject,
DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject,
DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject,
UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection,
DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject,
TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal&
connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection
owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions,
DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection
outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry,
DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at CallSite.Target(Closure , CallSite , Object )
--- End of inner exception stack trace ---
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext
funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame
frame)
at
System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
frame)
at
System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
frame)
TargetObject :
CategoryInfo : NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId : SqlException
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at Update-SQLUserPassword, K:\DeployablePackages\RetailRetargetingTool\RetailServer\RetailServi
cingTools\RetailServicingTools.psm1: line 1095
at <ScriptBlock>, K:\DeployablePackages\RetailRetargetingTool\RetailServer\EnvironmentRetarget\
RetargetRetailServer.ps1: line 55
at <ScriptBlock>,
K:\DeployablePackages\RetailRetargetingTool\RetailServer\scripts\RetargetRetailServer.ps1:
line 20
at <ScriptBlock>, <No file>: line 3
at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}

try{
$erroractionpreference = 'stop';
&
'K:\DeployablePackages\RetailRetargetingTool\RetailServer\scripts\RetargetRetailServer.ps1'
}
catch
{
$erroractionpreference = 'Continue';
Write-Error ($_ | Format-List * -Force | Out-String -Width 4096);
[Environment]::Exit(999)
} :
PSMessageDetails :
Exception : System.Management.Automation.MethodInvocationException: Exception calling "Open" with "0"
argument(s): "A connection was successfully established with the server, but then an error occurred during the login
process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)"
---> System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error
occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an
authority that is not trusted.) ---> System.ComponentModel.Win32Exception: The certificate chain was issued by an
authority that is not trusted
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity,
SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString
newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData
reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling,
SqlAuthenticationProviderManager sqlAuthProviderManager)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options,
DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection,
DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool
pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions
userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject,
DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject,
DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject,
UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions
userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject,
TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection
owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection,
DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection
outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at CallSite.Target(Closure , CallSite , Object )
--- End of inner exception stack trace ---
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext
funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame
frame)
at
System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at
System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
TargetObject :
CategoryInfo : NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId : SqlException
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at Update-SQLUserPassword,
K:\DeployablePackages\RetailRetargetingTool\RetailServer\RetailServicingTools\RetailServicingTools.psm1: line 1095
at <ScriptBlock>,
K:\DeployablePackages\RetailRetargetingTool\RetailServer\EnvironmentRetarget\RetargetRetailServer.ps1: line 55
at <ScriptBlock>,
K:\DeployablePackages\RetailRetargetingTool\RetailServer\scripts\RetargetRetailServer.ps1: line 20
at <ScriptBlock>, <No file>: line 3
at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
At line:1 char:1
+ &{ try{
+ ~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException

I have the same question (0)
  • Suggested answer
    Xusheng Profile Picture
    Microsoft Employee on at

    This is the error message "A connection was successfully established with the server, but then an error occurred during the login

    process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)"

    ---> System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error

    occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an

    authority that is not trusted."

    Have you check the certificate at this ENV? Is there any certificates expired?

    I also suggest you debug it at Power shell ISE to find the RCA. 

    And BTW, it is better you can log a Microsoft service request to double confirm this issue with support team.

  • Vasudev Kochuveettil Profile Picture
    310 on at

    Thank you Steven, let me retake a look or try approaching the support.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 164 Super User 2026 Season 1

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 105 Super User 2026 Season 1

#3
Zain Mehmood Profile Picture

Zain Mehmood 89 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans