Legal NoticeThe opinions expressed herein are my own personal opinions and do not represent my employer’s view in anyway.
- C# HttpClient POST or PUT Json with content type application/json
- C# Get expiry timestamp from JWT token
- Run tasks in parallel using .NET Core, C# and async coding
- Using C# HttpClient from Sync and Async code
- ASP.Net Core API - "'s' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0."
- Creating dynamic arrays and lists using Dynamic and ExpandoObject in C#
- Read blob file from Microsoft Azure Storage with .NET Core
Category Archives: .net
Dapper is a easy to use object mapper for .NET and .NET Core, an it can be used a variety of ways. I use Dapper instead of Entity Framework because it makes my code less complex. BASICS OF DAPPER: THE … Continue reading
These 2 extension methods will remove specific query string parameters from an URL in a safe manner. METHOD #1: SPECIFY THE PARAMETERS THAT SHOULD GO (NEGATIVE LIST): Usage/Test cases: METHOD #2: SPECIFY THE PARAMETERS THAT MAY STAY (POSITIVE LIST): Usage/Test … Continue reading
JSON love to be camelCased, while the C# Model class hates it. This comes down to coding style, which is – among developers – taken more seriously than politics and religion. But fear not, with Newtonsoft (or is it newtonSoft … Continue reading
The .NET Core IMemoryCache is probably the simplest cache there is, and it is very easy to use, once you get your head around the weird SizeLimit property. Especially when using the nice extension methods in this NuGet package: Microsoft.Extensions.Caching.Memory … Continue reading
There are several patterns on how to allow multiple threads to write to the same file. the ReaderWriterLock class is invented for this purpose. Another classic is using semaphors and the lock statement to lock a shared resource. This article … Continue reading
The Polly retry library and the IHttpClientBuilder is a match made in heaven as it defines all the retry logic at startup. The actual HttpClient calls are therefore untouched by any retry code. The retry logic is called policies, and … Continue reading
Application Insights is a wonderful tool. Especially when you have a microservice or multi-application environment and you need one place for all the logs and metrics. But it’s not free, and the costs can run wild if you are not … Continue reading
Using a IHttpClientFactory to create HttpClient connections have a number of advantages, as you can configure several httpclients on startup. Each client will be reused, including the properties attached to that client. In a previous post I showed how to … Continue reading
Method not found: ‘Void Sitecore.ContentSearch.Diagnostics.AbstractLog.SingleWarn(System.String, System.Exception)’.
I struggled with this error in my development environment: Method not found: ‘Void Sitecore.ContentSearch.Diagnostics.AbstractLog.SingleWarn(System.String, System.Exception)’. at System.RuntimeMethodHandle.InvokeMethod(Object target, Object arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object parameters, Object arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, … Continue reading