Legal Notice
The opinions expressed herein are my own personal opinions and do not represent my employer’s view in anyway.Top Posts
- C# DateTime to UNIX timestamps
- C# HttpClient POST or PUT Json with content type application/json
- C# get results from Task.WhenAll
- Run tasks in parallel using .NET Core, C# and async coding
- Write to file from multiple threads async with C# and .NET Core
- Build .net core 6 projects with Azure Devops using yml files
- .NET API CORS: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header.NET API
Archive
Meta
Category Archives: Sitecore 9
Sitecore The type or namespace name ‘Job’ does not exist in the namespace ‘Sitecore.Jobs’ (are you missing an assembly reference?)
From Sitecore 9.0 to Sitecore 9.2, Sitecore updated the Jobs namespace: This resonates with the Sitecore structural changes where Sitecore implements abstractions for most of their code. This change began all the way back in Sitecore 7.5 and makes it … Continue reading
Posted in c#, Sitecore 10, Sitecore 9
Tagged Abstractions, DefaultJob, Jobs, Sitecore
Leave a comment
Sitecore TargetInvocationException: Exception has been thrown by the target of an invocation
You are probably upgrading some packages in your Sitecore instance, but instead of success and glory, you are greeted with the following error message: The real reason for the error is hidden because Counters are enabled. To see the actual … Continue reading
Posted in Sitecore, Sitecore 10, Sitecore 6, Sitecore 7, Sitecore 8, Sitecore 9
Tagged Counters, Counters.Enabled, Sitecore, TargetInvocationException
Leave a comment
Could not load file or assembly ‘System.Diagnostics.DiagnosticSource, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ or one of its dependencies. The system cannot find the file specified
The following error may occur when upgrading Microsoft ApplicationInsights: [FileNotFoundException: Could not load file or assembly ‘System.Diagnostics.DiagnosticSource, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ or one of its dependencies. The system cannot find the file specified.]Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule.Application_BeginRequest(Object sender, EventArgs e) +0System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142System.Web.<>c__DisplayClass285_0.b__0() +38System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +11857717System.Web.HttpApplication.ExecuteStep(IExecutionStep … Continue reading
Posted in c#, General .NET, Sitecore 10, Sitecore 7, Sitecore 8, Sitecore 9
Tagged Application Insights, Binding, Dependency, NuGet
Leave a comment
Sitecore SOLR Search in multiselect lists fails unless you add the field to the defaultSolrIndexConfiguration config
So I have this multiselect field in Sitecore: The field is a treelist field, but this article works for all multiselect fields, treelist, checklist, multilist, etc. So how do you return the field as a list of Sitecore ID’s from … Continue reading
Posted in .net, c#, Sitecore 10, Sitecore 7, Sitecore 8, Sitecore 9
Tagged index, search, Sitecore, SOLR
Leave a comment
Sitecore Create Fully Qualified Url
A classic issue in Sitecore: Some code running in one Site Context is creating a link to a page in another context, and the link turns out to be complete garbage. For example, this code is running in the modules_shell … Continue reading
Posted in .net, c#, General .NET, Sitecore, Sitecore 6, Sitecore 7, Sitecore 8, Sitecore 9
Tagged LinkManager, links, SiteContext, Sitecore, SiteResolving, URL
Leave a comment
Sitecore System.Data.DataException: Error executing SQL command: INSERT INTO [Properties] ( [Key], [Value] ) VALUES ( @name, @value ) —> System.Data.SqlClient.SqlException: String or binary data would be truncated
I just deployed, and now I cannot log in. Is it an error in the code? Or is it an error in data. Don’t worry, your login ticket just got messed up in the Properties table of the CORE database. … Continue reading
Posted in General .NET, Sitecore 6, Sitecore 7, Sitecore 8, Sitecore 9
Tagged login, Properties, SC_TICKET, Sitecore, System.Data.DataException
Leave a comment
Sitecore create custom Content Editor Warnings using Conditions and Rules
The Content Editor Warnings are these yellow boxes that hover over your content in the Content Editor in Sitecore: In the old days we would make them by hooking into the getContentEditorWarnings pipeline. Nowadays we use the Sitecore Rules engine. … Continue reading
Posted in c#, General .NET, Sitecore 5, Sitecore 6, Sitecore 7, Sitecore 8, Sitecore 9
Tagged Conditions, ContentEditorWarnings, RuleContext, rules, Sitecore, Warning, Yellow Box
Leave a comment
Sitecore poor Index Update performance linked to missing Index in the Links database
Suddenly my index updates took forever to finish. I mean, one index update would take 2 minutes. And I have a lot of index updates. A lot. UPDATE: 2022-01-19: Sitecore have suggested the same changes to the links database in … Continue reading
Posted in General .NET, Sitecore, Sitecore 5, Sitecore 6, Sitecore 7, Sitecore 8, Sitecore 9
Tagged index, Linkdatabase, links, Sitecore
2 Comments
Sitecore high CPU usage – is the SQL Session State Provider the villain?
My massive Sitecore 9.1 installation started having CPU spikes, even when the servers did not seem to receive more requests. When CPU spiked, I could see that the requests queue would build up, until it crashed with the following error: … Continue reading
Posted in Sitecore 7, Sitecore 8, Sitecore 9
Tagged Performance, Session state, Sitecore, SQL
Leave a comment
Why Sitecore Composable DXP is great news for developers and consultants
Sitecore announced that they will embrace the Composable DXP approach. DXP is, according to Gartner: A digital experience platform (DXP) is an integrated set of core technologies that support the composition, management, delivery and optimization of contextualized digital experiences. Gartner … Continue reading