Quantcast
Channel: Brian Pedersen's Sitecore and .NET Blog
Browsing all 285 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Sitecore 9 Caching – Sitecore.Caching.CacheManager.GetAllCaches() changed...

With the increased use of dependency injection, in Sitecore, some classes do no longer return concrete classes, but interfaces instead. You therefore need to change your code, if you use the...

View Article


Image may be NSFW.
Clik here to view.

Sitecore check access and roles programatically

The Sitecore security model have changed over time, but the general API to check security access and roles have been stable for many many years. CHECK IF USER HAS ACCESS TO AN ITEM: To check if a user...

View Article


Image may be NSFW.
Clik here to view.

c# Async fire and forget

Often in application development you want a process to call another thread and continue the process flow, without waiting for a response from the called thread. This pattern is called the “fire and...

View Article

Image may be NSFW.
Clik here to view.

Azure Application Insights – Multiple services from same server

This trick enables you to have multiple services from the same server log to the same Application Insights instance, and at the same time distinguish between each service. Application Insights...

View Article

Image may be NSFW.
Clik here to view.

Sitecore Security: Roles in Roles – What it is and how it works

The Sitecore Roles-In-Roles is an extension to the basic authorization that have been around ever since Sitecore 5. WHAT IS ROLES-IN-ROLES? Roles-In-Roles allows you to have nested roles, so when you...

View Article


Image may be NSFW.
Clik here to view.

SQL Cannot resolve the collation conflict between “xxx” and “xxx” in the...

When joining 2 tables from different databases, the following error might occur: Cannot resolve the collation conflict between “SQL_Latin1_General_CP1_CI_AS” and “Danish_Norwegian_CI_AS” in the equal...

View Article

Image may be NSFW.
Clik here to view.

Using emojis in Sitecore

Because people younger than me stopped communicating with words and instead adopted a modern version of hieroglyphs, emojis have become a part of every modern OS and Browser, and have even been adopted...

View Article

Image may be NSFW.
Clik here to view.

Improve Sitecore Experience Editor Performance by Disabling Number of Locked...

The Sitecore Experience Editor is not the fastest tool in the shed, but you can improve the performance slightly by disabling the counter on the “My items” button that shows how many items you...

View Article


Image may be NSFW.
Clik here to view.

Sitecore create packages using PowerShell

The Sitecore PowerShell Extensions is a very powerful module what allows you to automate a lot of the trivial Sitecore tasks. The Export-Package command will create a Sitecore package. This script will...

View Article


Image may be NSFW.
Clik here to view.

Azure ApplicationInsights track custom metrics using the TelemetryClient

The Microsoft.ApplicationInsights nuget package is your code gateway to the Microsoft Application Insights portal, and also to the Azure Monitor universe. You use these tools as a shared place for your...

View Article

Image may be NSFW.
Clik here to view.

Serilog – Add thread ID to the log file

Serilog is more or less the default file logger when developing .NET Core applications. The simple logger can easily be modified to – for example – add the thread ID. FIRST THINGS FIRST: THE SERILOG...

View Article

Image may be NSFW.
Clik here to view.

Sitecore delete old item versions

Are your Sitecore editors version-trigger-happy? Is your master database items drowning in old versions that will never be used – or is just exact replicas of the previous version? Many versions of the...

View Article

Image may be NSFW.
Clik here to view.

Sitecore disable automatic lock on create items

From Sitecore 9, Sitecore changed the default behavior when creating items in the content editor. As per default, any item is locked when created, and will only be unlocked if the user unlocks it, or...

View Article


Image may be NSFW.
Clik here to view.

Your session ID is being reused and there is nothing you can do about it

In many years we have been used to the fact that the ASP.Net session ID uniquely identifies one session, and one session only. Back in 2006, Margaret Rouse from TechTarget even wrote in the definition...

View Article

Image may be NSFW.
Clik here to view.

Sitecore Pipelines – The great walkthrough

I have previously stated my enthusiasm for the Sitecore Pipeline concept. This article describes how to create your own, how to add parameters, and which properties to use. WHAT IS A SITECORE PIPELINE?...

View Article


Image may be NSFW.
Clik here to view.

Read blob file from Microsoft Azure Storage with .NET Core

In order to read a blob file from a Microsoft Azure Blob Storage, you need to know the following: The storage account connection string. This is the long string that looks like this:...

View Article

Image may be NSFW.
Clik here to view.

Read from Azure Queue with Azure WebJobs 3.0 and .NET Core

From WebJobs 2.0 to WebJobs 3.0 Microsoft have completely rewritten the way Azure WebJobs is used. The reasons are probably noble, but they require you to redo your work when upgrading. So I made this...

View Article


Image may be NSFW.
Clik here to view.

Deserialize XML array to string[] and how to allow JSON to be deserialized...

How do you deserialize the classic XML array to an string[] type? The XML representation of an array is a list of elements: <?xml version="1.0" encoding="UTF-8"?> <root> <MyXml>...

View Article

Image may be NSFW.
Clik here to view.

Sitecore get Context from fully qualified URL

One of the basic Sitecore concepts is the concept of a context. The context is resolved from the HTTP Context to Sitecore and determines the database, language, user domain, content start item etc. The...

View Article

Image may be NSFW.
Clik here to view.

Create Sitecore items using PowerShell

You can use the Sitecore PowerShell Extensions for many trivial tasks. This script creates a “components” folder below all items from a root item: // Get the root item $root = Get-ChildItem -Path...

View Article
Browsing all 285 articles
Browse latest View live