
Hello all,
I am trying to move first steps in Commerce retail sdk. I am following this video form community tech talk:
But when I hit F5 to begin to build the solution, the script Install.ps1 starts , and I am getting error on step 16/27 when it tries to install the CommerceStoreScaleUnitSetup
C:\Users\user\source\repos\Dynamics365Commerce.ScaleUnit\src\ScaleUnitSample\Download\CommerceStoreScaleUnitSetup.exe install --RetailServerCertFullPath store:///My/LocalMachine?FindByThumbprint=CA97223E7ED88AA83BBA3F97EBCCA82374A53DB2 --TrustSqlServerCertificate -v Trace --UseSelfHost --SkipSelfHostProcessStart --Port 58257
[21:51:34 DBG] [16/27] Instantiating step Microsoft.Dynamics.Commerce.Installers.Framework.Security.SetCertificatePrivateKeyPermission: Grant the user account a permission to read a certificate's private Key
[21:51:34 INF] [16/27] Executing step Microsoft.Dynamics.Commerce.Installers.Framework.Security.SetCertificatePrivateKeyPermission: Grant the user account a permission to read a certificate's private Key
[21:51:34 DBG] Granting account DOMAIN\user a Read permission to the file C:\ProgramData\Application Data\Microsoft\Crypto\RSA\MachineKeys\27bf2507d6a9bf54605e79a8e80846d3_732874aa-e236-459e-a9a5-5a2ba111b789 representing the certificate's private key.
[21:51:34 DBG] [16/27] Step Microsoft.Dynamics.Commerce.Installers.Framework.Security.SetCertificatePrivateKeyPermission failed with System.InvalidOperationException: Metodo non riuscito con codice di errore imprevisto: 3.
in System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext)
in System.Security.AccessControl.FileSystemSecurity..ctor(Boolean isContainer, String name, AccessControlSections includeSections, Boolean isDirectory)
in System.Security.AccessControl.FileSecurity..ctor(String fileName, AccessControlSections includeSections)
in Microsoft.Dynamics.Commerce.Installers.Framework.Security.FileSystemAccessHelper.SetFileAccess(IFileSystem fileSystem, String userName, String filePath, FileSystemRights fileSystemRights, AccessControlType access)
in Microsoft.Dynamics.Commerce.Installers.Framework.Security.SetCertificatePrivateKeyPermission.<Run>d__3.MoveNext()
--- Fine traccia dello stack da posizione precedente dove è stata generata l'eccezione ---
in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
in Microsoft.Dynamics.Commerce.Installers.Framework.InstallerFramework.<Run>d__9.MoveNext()
[21:51:34 ERR] Metodo non riuscito con codice di errore imprevisto: 3.
System.InvalidOperationException: Metodo non riuscito con codice di errore imprevisto: 3.
in System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext)
in System.Security.AccessControl.FileSystemSecurity..ctor(Boolean isContainer, String name, AccessControlSections includeSections, Boolean isDirectory)
in System.Security.AccessControl.FileSecurity..ctor(String fileName, AccessControlSections includeSections)
in Microsoft.Dynamics.Commerce.Installers.Framework.Security.FileSystemAccessHelper.SetFileAccess(IFileSystem fileSystem, String userName, String filePath, FileSystemRights fileSystemRights, AccessControlType access)
in Microsoft.Dynamics.Commerce.Installers.Framework.Security.SetCertificatePrivateKeyPermission.<Run>d__3.MoveNext()
--- Fine traccia dello stack da posizione precedente dove è stata generata l'eccezione ---
in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
in Microsoft.Dynamics.Commerce.Installers.Framework.InstallerFramework.<Run>d__9.MoveNext()
I have already granted full permission to the file, on both Everyone and DOMAIN\user level.
Any suggestions to solve this issue?
Regards,
Gaetano.
Looks like some permission issue related to access on the private keys. Can you go to CERTLM (certificate manager) and make sure that the user running installation has full access to the certificate? Give full access to the user. You could also try running VS as an administrator.