Monday, June 10, 2019

Sitecore XC 9.2- Fix for Install-SitecoreConfiguration : The service cannot accept control messages at this time. (Exception from HRESULT: 0x80070425)



Error details -
[------------ StoreFront-PreconfigureInstance_StartAppPool : ManageAppPool -------------------------------------------]
[StoreFront-PreconfigureInstance_StartAppPool]:[Start] SC921sc.dev.local
VERBOSE: Performing the operation "Start-WebAppPool" on target "SC921sc.dev.local".
VERBOSE: Checking state of App Pool 'SC921sc.dev.local'
VERBOSE: Starting App Pool 'SC921sc.dev.local'
Install-SitecoreConfiguration : The service cannot accept control messages at this time. (Exception from HRESULT:
0x80070425)
At C:\deploy\SIF.Sitecore.Commerce.3.0.28\Deploy-Sitecore-Commerce.ps1:95 char:1
+ Install-SitecoreConfiguration @params -Verbose *>&1 | Tee-Object "$PS ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

[TIME] 00:03:14
Invoke-ManageAppPoolTask : The service cannot accept control messages at this time. (Exception from HRESULT:
0x80070425)
At C:\Program
Files\WindowsPowerShell\Modules\SitecoreInstallFramework\2.1.0\Public\Install-SitecoreConfiguration.ps1:641 char:25
+                         & $entry.Task.Command @paramSet | Out-Default
+                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-ManageAppPoolTask


`FIx - I think there was issue in service, they it cannot accept control messages at this time. I have restarted the system and it worked for me.

Saturday, June 8, 2019

Sitecore XC 9.2 - Mulitenant Adding a new tenant is very easy.

It's very simple to configure multiple tenants in Sitecore XC - Here is the link for more details - Details


I have followed a few steps here and watched the video, It's very easy and straightforward.


Good work Sitecore!

Saturday, June 1, 2019

Sitecore XC 9.2- Fix for Install- MERGE statement attempted to UPDATE or DELETE



Today, I was trying to install XC again to refresh an existing instance and found below error -

msdeploy.exe : Error: .Net SqlClient Data Provider: Msg 8672, Level 16, State 1, Line 2 The MERGE statement attempted to UPDATE or DELETE the same row more than once. This happens when a target row matches more than one source row. A
MERGE statement cannot UPDATE/DELETE the same row of the target table multiple times. Refine the ON clause to ensure a target row matches at most one source row, or use the GROUP BY clause to group the source rows.
At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\2.1.0\Public\Tasks\Invoke-CommandTask.ps1:31 char:13
+             & $Path $Arguments | Out-Default
+             ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Error: .Net Sql...he source rows.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Error: Script execution error.  The executed script:
BEGIN TRANSACTION;
CREATE TABLE #Blobs (
    BlobId  UNIQUEIDENTIFIER NOT NULL,
    [Index] INT              NOT NULL,
    Data    IMAGE            NOT NULL,
    Created DATETIME         NOT NULL
);
CREATE TABLE #Items (
    ID         UNIQUEIDENTIFIER NOT NULL PRIMARY KEY,
    Name       NVARCHAR (256)   COLLATE database_default NOT NULL,
    TemplateID UNIQUEIDENTIFIER NOT NULL,
    MasterID   UNIQUEIDENTIFIER NOT NULL,
    ParentID   UNIQUEIDENTIFIER NOT NULL,
    Created    DATETIME         NOT NULL,
    Updated    DATETIME         NOT NULL

Fix - you must remove the reference to the "ModuleHabitatImages" from the Includes section of the Master_SingleServer.json file

Sunday, May 26, 2019

Sitecore XC 9.2- Fix for Install-SitecoreConfiguration : Cannot retrieve the dynamic parameters for the cmdlet. Retrieving the COM class



Recently, While doing the reinstallation of Sitecore commerce, I got below error.

[------------------------ CommerceEngine-Ops_CreateAppPool : AppPool -------------------------------------------------]
Resolving ConfigFunction extension 'concat'
Resolved 'Invoke-ConcatConfigFunction'
Resolving ConfigFunction extension 'concat'
Resolved 'Invoke-ConcatConfigFunction'
Invoke-ConcatConfigFunction
Concatenating: \ sitecore
Result: \sitecore
Invoke-ConcatConfigFunction
Concatenating: sitecore \sitecore
Result: sitecore\sitecore
Creates or updates the app pool.
Install-SitecoreConfiguration : Cannot retrieve the dynamic parameters for the cmdlet. Retrieving the COM class
factory for component with CLSID {688EEEE5-6A7E-422F-B2E1-6AF00DC944A6} failed due to the following error: 80040154
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
At C:\deploy\SIF.Sitecore.Commerce.3.0.28\Deploy-Sitecore-Commerce.ps1:95 char:1
+ Install-SitecoreConfiguration @params -Verbose *>&1 | Tee-Object "$PS ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

[TIME] 01:44:59

Solution - I have reviewed and identify it's because of using the 32 bit Powershell instead of 64 bit

Here is the error log file.




Saturday, May 4, 2019

Sitecore XC 9.2 - Add a new plugin steps.

There are two VSIX templates available for creating Sitecore Commerce Plugin

1.  Sitecore Commerce Engine Template developed By Andrew Sutherland

This will require to create a simple scaffolding plugin project
Allows creation of individual item-specific code file for commands, controllers, pipelines, pipeline blocks, etc.
We can download it from the marketplace -Here

2. Commerce.Plugin.vsix – Sitecore Commerce SDK

It will need a few cleanups and a lot of predefine simple code setup.


It's compatible with vs 2017.  if you have vs2019 - You may find below error in the log -

11/20/2019 1:46:39 AM - Found installed product - Global Location
11/20/2019 1:46:39 AM - Found installed product - Visual Studio Community 2019
11/20/2019 1:46:39 AM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
   at VSIXInstaller.ExtensionService.GetInstallableDataImpl(IInstallableExtension extension, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
   at VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
   at VSIXInstaller.ExtensionPackService.IsExtensionPack(IStateData stateData, Boolean isRepairSupported)
   at VSIXInstaller.ExtensionPackService.ExpandExtensionPackToInstall(IStateData stateData, Boolean isRepairSupported)
   at VSIXInstaller.App.Initialize(Boolean isRepairSupported)
   at VSIXInstaller.App.Initialize()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

Start the installation -



Setup a new project -


Sample project structure -


Friday, April 12, 2019

Sitecore commerce - Fix for Install-SitecoreConfiguration : The operation has timed out.



Error - 
Install-SitecoreConfiguration : The operation has timed out.
At C:\deploy\SIF.Sitecore.Commerce.3.0.28\Deploy-Sitecore-Commerce.ps1:95 char:1
+ Install-SitecoreConfiguration @params -Verbose *>&1 | Tee-Object "$PS ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

Fix

Update the timeout here.


Thursday, March 7, 2019

Sitecore commerce -Remove problem orders.


Query to remove problem orders:

DELETE FROM [XC.Commerce.SharedEnvironments].[dbo].[CommerceEntities]
WHERE [Id] in (SELECT[CommerceEntityId]
FROM [XC.Commerce.SharedEnvironments].[dbo].[CommerceLists]
where ListName = 'List-problemorders-ByDate')

and

DELETE FROM [XC.Commerce.SharedEnvironments].[dbo].[CommerceLists]
where ListName = 'List-problemorders-ByDate'