Author Archives: briancaos

About briancaos

Developer at Pentia A/S since 2003. Have developed Web Applications using Sitecore Since Sitecore 4.1.

Sitecore Rule – Personalize based on any field in any facet in your Contact

This Sitecore Personalization Rule was developed by my colleague Martin Rygaard with the purpose of being able to personalize on any field in any facet on a contact. STEP 1: CREATE THE CONDITION Create a new “Condition” below /sitecore/system/Settings/Rules/Definitions/Elements/??? The text … Continue reading

Posted in .net, c#, Sitecore 7, Sitecore 8 | Tagged , , , , | Leave a comment

C# Using Newtonsoft and dynamic ExpandoObject to convert one Json to another

The scenario where you convert one input Json format to another output Json is not uncommon. Before C# dynamic and ExpandoObject you would serialize the input Json to POCO model classes and use a Factory class to convert to another … Continue reading

Posted in c#, General .NET | Tagged , , , | Leave a comment

.NET Session state is not thread safe

When working with the .NET session state you should bear in mind that the HttpContext.Current.Session cannot be transferred to another thread. Imagine that you, from the Global.asax would like to read the SessionID each time a session is started: To … Continue reading

Posted in .net, c#, General .NET | Tagged , , , , , , | Leave a comment

Edit special field types in Sitecore Experience Editor – Custom Experience Editor Buttons replaces the Edit Frame

The Sitecore Experience Editor allows inline editing of simple field types like text and rich text (HTML) field, and a few complex ones like links. But editing checkboxes, lookup values, multiselect boxes, or any custom field you might have developed … Continue reading

Posted in Sitecore 7, Sitecore 8 | Tagged , , , , | Leave a comment

Sitecore Scheduled Task – Schedule time format and other quirks

The Sitecore task runner, usually called Scheduled Tasks, is a simple way of executing code with intervals. You configure scheduled tasks in Sitecore, at /sitecore/system/Tasks/Schedules: The quirkiest configuration setting is the “Schedule” field, which is a pipe separated string determining when … Continue reading

Posted in c#, Sitecore, Sitecore 5, Sitecore 6, Sitecore 7, Sitecore 8 | Tagged , , , | 1 Comment

Webhook Event Receiver with Azure Functions

Microsoft Azure Functions is a solution to run small pieces of code in the cloud. If your code is very small and have only one purpose, an Azure Function could be the cost effective solution. This is an example of … Continue reading

Posted in .net, c#, General .NET, Microsoft Azure | Tagged , , , | Leave a comment

Requesting Azure API Management URL’s

The Azure API Management is a scalable and secure API gateway/proxy/cache where you can expose your API’s externally and still have secure access. In Azure API Management you create a “Product” which is a collection of API’s that is protected … Continue reading

Posted in c#, General .NET | Tagged , , , | Leave a comment

Sitecore contact cannot be loaded, code never responds

In Sitecore, it is possible to encounter a situation where the calls identifying or locking a contact never responds, but there is no errors returned. A call to identify: And a call to Load a contact: Can both take forever … Continue reading

Posted in Sitecore 7, Sitecore 8 | Tagged , , , , | Leave a comment

Sitecore Media Library integration with Azure CDN using origin pull

If your Sitecore website is heavy on content from the media library you can offload your Sitecore instances by allowing images to be retrieved from a Content Delivery Network (CDN). If you use Microsoft Azure, you do not need to … Continue reading

Posted in Sitecore 8 | Tagged , , , , , , , | 3 Comments

Sitecore ContentSearch – Get items from SOLR or Lucene – A base class implementation

Reading items from Sitecore is pretty straight forward: And it is fast, unless you need to retrieve items from many paths, or need to retrieve every child of a certain base class. In these situations you resolve to using the … Continue reading

Posted in .net, c#, General .NET, Sitecore 7, Sitecore 8 | Tagged , , , , , , | Leave a comment