Tuesday, November 17, 2020

Sitecore 10 - ASP.NET Core Rendering SDK Fix for ERROR: for traefik Cannot start service traefik:

During the setup for ASP.NET Core Rendering SDK, I found below error

 ERROR: for traefik  Cannot start service traefik:



Investigation, I checked the default port of traefik in container and found it was trying to connect port 443


I checked my local Sitecore 10 IIS setup and found the same port is being used by 


For the time being, I have turned off the local site to make it work, but we can modify the traefik configuration for the permanent fix, I will post a separate blog post for that.


Friday, November 13, 2020

Sitecore 10 - ASP.NET core rendering engine - Fix for Error - 'Invoke-WebRequest' is not recognized as an internal or external command

During the ASP.NET core rendering engine setup, I found below error 


I updated the docker file for the absolute path "RUN Invoke-WebRequest 'https;//dist.nuget.org/win-x86-commonadline/v5.6.0/nuget.exe' - UserBasicPrasing -OutFile ''C;\ProgramFiles\NugGet\nuget.exe" but it didn't work.

Error - 'Invoke-WebRequest' is not recognized as an internal or external command

My current PowerShell version was 5.1

I tried run this command through the plain PowerShell window, As suggested by Sitecore community and it worked for me - 

$Url = 'https://www.google.com/search?q=jitendra%20soni%20sitecore'
$Web = Invoke-WebRequest -Uri $Url -UseBasicParsing
$Web.BaseResponse.ResponseUri.AbsoluteUri

I used the above command for the testing.

I was discussing in the Sitecore slack thread and as suggested by Vincen and Maarten, I found this link useful 


Conclusion and fix - basically to make it work, I had to modify the script to set the default shell to PowerShell,


I was thinking to provide this fix into the Sitecore main GitHub repository but found that this had already fixed by our community legend GuidovTricht 

As always, Don't forget to appreciate the hard work and contribution of our community members, so I added my comments.



Tuesday, October 27, 2020

Sitecore Symposium 2020 - Day 2 - My list of tech sessions.

For the second day, I have identified a few tech sessions, here are my list.

1. Beyond the marketing hub: Learning content management

The pandemic has exposed serious flaws in many corporations' learning and training strategies. Businesses that previously relied on in-person delivery must implement more resilient strategies. Leveraging the innovative capabilities of Sitecore Content Hub makes it possible to expand its value beyond the stereotypical marketing content solution. Utilizing Content Hub, global businesses can maintain learning and training continuity and resiliency in a post-pandemic era. On-demands will be available on Thursday, October 29, by clicking the gray tile below.

2 Contain yourself: Why Kubernetes

Containers represent a large change with various impacts across your organization. Come learn the basics of containers and Kubernetes and what this means to you, specifically. From C-level executives to marketers to infrastructure and development teams, we invite all to come find out if containers are right for you. On-demands will be available on Thursday, October 29, by clicking the gray tile below.

3.Future of global e-commerce: Sitecore XC & beyond

AI is turning more human, and people are looking at more ways to expand its reach through cognitive computing, as we continue to evolve and adapt to our new digital world. With cognitive technologies, commerce enterprises can gather richer and more personalized data about their customers. Our session will reveal the power of Sitecore XP and XC and showcase how to design a future-centric e-commerce platform. On-demands will be available on Thursday, October 29, by clicking the gray tile below.

4 Experience-focused Commerce -  All related sessions.

Monday, October 26, 2020

Sitecore Symposium 2020 - Day 1 - My list of tech sessions.


Sitecore Symosium 2020 is going to be very useful to learn the latest updates and skills, For day1, I have decided to attend below sessionsnos.

1. Influencer Roundtable with Microsoft: Integrating AI into existing digital marketing strategy

Integrating advanced analytics and machine learning into your digital stack to deliver new MarTech capabilities is the latest frontier in marketing and digital transformation. From leveraging Sitecore’s out of the box AI Auto-personalization to prediction propensities and content attribution to digital personas and tailored smart recommendations, learn a framework on how to start planning and building these capabilities with confidence and success. We will also be exploring how other customers are utilizing AI in their marketing strategies.

2. Headless Sitecore Commerce with Sitecore JSS

COVID-19 has taught retailers the importance of implementing e-commerce solutions with accelerated time-to-market. Attendees of this session will learn about EPAM’s Headless Sitecore Commerce Accelerator and how easily you can get started with Sitecore JSS and Sitecore Commerce. We will discuss how you can leverage source code that saves weeks of development time, enable front-end JavaScript developers to develop and adjust website features quickly and independently from back-end developers, and create seamless digital experiences across multiple touchpoints and devices.

3 Sitecore Content AI

In our quest to help our customers scale digital experiences, Sitecore is releasing Content AI. We released our Auto-Personalization solution in 2019 to make personalization easy, scalable and effective. Now, Content AI provides AI-driven solutions to suggest and quickly create content that maximizes outcomes, relevance and time-to-value.

4 Containers & AKS: Taking Sitecore 10 to the next level

This session will focus on the container functionality introduced in Sitecore 10. Join us to take a look at this new world of running Sitecore in Containers from development through to production in Azure Kubernetes Service (AKS). This approach empowers everyone from developers to IT, making sure you realize the most value possible from your Sitecore experience

Sunday, October 25, 2020

Fix for AddCartLine: Error Operation failed: One or more dependencies failed

 Recently, I got this eeror while adding items to the cart, below are the error details - (Response preview from the network tab)

 1.     {Lines: null, Email: null, Subtotal: null, TaxTotal: null, Total: null, ShippingTotal: null,…}  
 1.     AccountingParty: null  
 2.     ContentEncoding: null  
 3.     ContentType: null  
 4.     Data: null  
 5.     Discount: null  
 6.     Email: null  
 7.     Errors: [,…]  
 1.     0: "AddCartLine: {  
 2.     ↵ "Message": "Operation failed: One or more dependencies failed",  
 3.     ↵ "ExceptionMessage": "One or more dependencies failed",  
 4.     ↵ "ExceptionType": "Sitecore.XConnect.Operations.DependencyFailedException",  
 5.     ↵ "StackTrace": null,  
 6.     ↵ "InnerException": {  
 7.     ↵  "Message": "An error has occurred.",  
 8.     ↵  "ExceptionMessage": "Login failed for user 'collectionuser'.",  
 9.     ↵  "ExceptionType": "Sitecore.Xdb.Collection.Failures.DataProviderException",  
 10.     ↵  "StackTrace": "  at Sitecore.Xdb.Collection.Data.SqlServer.Managers.SqlContactRecordsManager.<GetContactIdentifiersFromIndexAsync>d__43.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at Sitecore.Xdb.Collection.Data.SqlServer.SqlDataProvider.<GetContactsByIdentifier>d__12.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at Sitecore.Xdb.Collection.DataProviderCountersDecorator.<GetContactsByIdentifier>d__16.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at System.Linq.AsyncEnumerable.<>c__DisplayClass440_0`1.<<ToAsyncEnumerable>b__1>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at System.Linq.AsyncEnumerable.AnonymousAsyncIterator`1.<MoveNextCore>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at System.Linq.AsyncEnumerable.AsyncIterator`1.<MoveNext>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at System.Linq.AsyncEnumerable.SelectManyAsyncIterator`2.<MoveNextCore>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at System.Linq.AsyncEnumerable.AsyncIterator`1.<MoveNext>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at System.Linq.AsyncEnumerable.SelectManyAsyncIterator`2.<MoveNextCore>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at System.Linq.AsyncEnumerable.AsyncIterator`1.<MoveNext>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at System.Linq.AsyncEnumerable.BufferAsyncIterator`1.<MoveNextCore>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at System.Linq.AsyncEnumerable.AsyncIterator`1.<MoveNext>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at System.Linq.AsyncEnumerable.SelectEnumerableAsyncIterator`2.<MoveNextCore>d__7.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at System.Linq.AsyncEnumerable.AsyncIterator`1.<MoveNext>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at System.Linq.AsyncEnumerable.<ForEachAsync_>d__174`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at Sitecore.XConnect.Service.RepositoryGetInvoker.<UpdateGetOperations>d__7`2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at Sitecore.XConnect.Service.RepositoryGetInvoker.<>c__DisplayClass4_2.<<Execute>b__5>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at Sitecore.XConnect.Service.RepositoryGetInvoker.<FailOperationsOnException>d__5.MoveNext()",  
 11.     ↵  "InnerException": {  
 12.     ↵   "Message": "An error has occurred.",  
 13.     ↵   "ExceptionMessage": "Login failed for user 'collectionuser'.",  
 14.     ↵   "ExceptionType": "Sitecore.Xdb.Collection.Failures.DataProviderException",  
 15.     ↵   "StackTrace": "  at Sitecore.Xdb.Collection.Data.SqlServer.Configuration.ElasticScaleConnectionManager.<OpenConnectionAsync>d__29.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at Sitecore.Xdb.Collection.Data.SqlServer.Managers.SqlContactRecordsManager.<>c__DisplayClass43_1.<<GetContactIdentifiersFromIndexAsync>b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at Sitecore.Xdb.Collection.Data.SqlServer.Managers.SqlContactRecordsManager.<GetContactIdentifiersFromIndexAsync>d__43.MoveNext()",  
 16.     ↵   "InnerException": {  
 17.     ↵    "Message": "An error has occurred.",  
 18.     ↵    "ExceptionMessage": "Login failed for user 'collectionuser'.",  
 19.     ↵    "ExceptionType": "System.Data.SqlClient.SqlException",  
 20.     ↵    "StackTrace": "  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)\r\n  at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)\r\n  at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)\r\n  at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)\r\n  at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)\r\n  at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)\r\n  at System.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.ShardMap.<OpenConnectionAsync>d__43.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at Sitecore.Xdb.Collection.Data.SqlServer.Configuration.ElasticScaleConnectionManager.<>c__DisplayClass29_0.<<OpenConnectionAsync>b__1>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n  at Sitecore.Xdb.Collection.Data.SqlServer.Configuration.ElasticScaleConnectionManager.<OpenConnectionAsync>d__29.MoveNext()"  
 21.     ↵   }  
 22.     ↵  }  
 23.     ↵ }  
 24.     ↵}"  
 8.     HasErrors: true  
 9.     HasInfo: false  
 10.     HasWarnings: false  
 11.     Info: []  
 12.     JsonRequestBehavior: 1  
 13.     Lines: null  
 14.     MaxJsonLength: null  
 15.     Parties: null  
 16.     Payments: null  
 17.     PromoCodes: null  
 18.     RecursionLimit: null  
 19.     Shipments: null  
 20.     ShippingTotal: null  
 21.     Subtotal: null  
 22.     Success: false  
 23.     TaxTotal: null  
 24.     Total: null  
 25.     TotalAmount: 0  
 26.     Url: null  
 27.     Warnings: []  
Fix - We identify that it's due to recent data restore and the role was not properly updated, After proving the access to collectionuser
The issue got resolve.

Reference -


Monday, October 12, 2020

Investigation and fix for SubmitCurrentVisitorOrder: Object reference not set to an instance of an object.

Recently, We got this issue while processing the order, Here are the investigation and fix details

We did a third party payment integration and while the payment party submit the success request to our website (XP + XC 9.3) we took the transaction details, Add a new components and send it to create the order.

The order created successfully but XC didn't redirect to order confirmation page, I think the process is after the order submission XC internally call the SubmitCurrentVisitorOrder to get the order details and show to the order confirmation page.



Investigation -  The error was clear the context was missing of visitor could be related to ant forgery or some missing handshake.

the point was the it was working fine in Firefox browser, so first we compare all cookies and session with Mozila and found a diff.


Mozila - We didn't find any diff.



We noticed that in Chrome there are mismatch in the ASP.NET_SessionId and there are a few missing cookies Global Analytics.

We have disabled the analytics and after that we found the same ASP.NET_SessionId and Analytics cookies,

So the issue was related to analytics, We have turned it off and raised a Sitecore ticket for the further investigation, I will keep you posted for the further update.



Sunday, October 11, 2020

Simple powershell ISE script to replace/correct sitecore content items.

  Recntly, I got a requirement to update all the content item, basically replacing all spaces with _ (under score).

Here is simple script to do that.

 cd '/sitecore/content/Home/Test'  
 Get-ChildItem -Recurse . | Where-Object { $_.Name -match " " } | ForEach-Object {   
   $originalName = $_.Name  
   $newName = $originalName -Replace " ", "_"  
   Write-Host "Renaming item from " -nonewline;  
   Write-Host $originalName -f Yellow -nonewline;  
   Write-Host " to " -nonewline;  
   Write-Host $newName -f Green;  
   $_.Editing.BeginEdit()  
   $_.Name = $newName;  
   $_.Editing.EndEdit()  
 }  

We can extend this script to update/assoicate the image url for the catalog items and so It's taht much easy.