Category Archives: General .NET

Issues related to general .NET and C# development

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

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 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

Sitecore user:created event not fired on Membership.CreateUser

Sitecore have since 7.5’ish fired events each time you manipulate the users in the .NET Membership database: But I noticed that the user:created event was not fired. This is because I call the .NET Membership provider directly: This call to … Continue reading

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

Sitecore ContentSearch Get Latest Version

The Sitecore ContentSearch API allows you to index content in either .NET Lucene or SOLR, dramatically speeding up retrieval of content, especially when querying items that are scattered across your content tree. Content retrieved from the ContentSearch API is not … Continue reading

Posted in .net, c#, General .NET, Sitecore 7, Sitecore 8 | Tagged , , , , , | 1 Comment

Sitecore Caching – Clear caches individually

The Sitecore caching engine is a simple yet powerful tool where Sitecore not only stores it’s own data for fast retrieval, but allows you to store your own data of any kind. Sitecore have a built in overview of the … Continue reading

Posted in .net, c#, General .NET, Sitecore 7, Sitecore 8 | Tagged , | 2 Comments

Sitecore and Feature Flags using LaunchDarkly

Feature flags are a software development best practice of gating functionality. Functionality can be deployed “off”, then turned on via the feature flag, separate from deployment. With feature flags, you can manage the entire lifecycle of a feature. Launchdarkly.com In … Continue reading

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

Get Sitecore System Info

Would you like to know the System Info of your current Sitecore instance: It’s fairly easy. I created an SysInfo.aspx page and dumped in into the /sitecore modules/shell folder. The page is now available on the URL <yourwebsite>/sitecore modules/shell/sysinfo.aspx. The … Continue reading

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