Legal Notice
The opinions expressed herein are my own personal opinions and do not represent my employer’s view in anyway.Top Posts
- C# HttpClient POST or PUT Json with content type application/json
- Using C# HttpClient from Sync and Async code
- Read blob file from Microsoft Azure Storage with .NET Core
- C# Get expiry timestamp from JWT token
- ASP.Net Core API - "'s' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0."
- C# Using Newtonsoft and dynamic ExpandoObject to convert one Json to another
- Creating dynamic arrays and lists using Dynamic and ExpandoObject in C#
Archive
Meta
Category Archives: .NET Core
Write to file from multiple threads async with C# and .NET Core
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
Posted in .net, .NET Core, c#, General .NET
Tagged .NET, .NET Core, Asynchronous, ConcurrentQueue, Multithreading
Leave a comment
HttpClient retry on HTTP timeout with Polly and IHttpClientBuilder
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
Posted in .net, .NET Core, c#
Tagged HttpClient, IHttpClientBuilder, IHttpClientFactory, Polly
Leave a comment
Azure Cognitive Search from .NET Core and C#
The Azure Cognitive Search engine is the search of choice in the Microsoft Azure. The search engine can be used in a myriad of ways and there are so many options that it can be difficult to find a starting … Continue reading
Posted in .NET Core, c#, General .NET, Microsoft Azure
Tagged Azure, Azure Cognitive Search, Azure Search, SOLR
Leave a comment
Filtering Application Insights telemetry using a ITelemetryProcessor
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
Posted in .net, .NET Core, General .NET, Microsoft Azure
Tagged Application Insights, ITelemetryProcessor, Telemetry
Leave a comment
Add a UserAgent to the IHttpClientFactory in .NET Core
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
Sending JSON with .NET Core QueueClient.SendMessageAsync
You need to Base64 encode JSON serialized strings before adding them to a queue Continue reading
Posted in .NET Core, c#, General .NET, Microsoft Azure
Tagged .NET Core, Azure.Storage.Queues, base64string, Queue
Leave a comment
Run tasks in parallel using .NET Core, C# and async coding
If you have several tasks that can be run in parallel, but still need to wait for all the tasks to end, you can easily achieve this using the Task.WhenAll() method in .NET Core. Imagine you have this imaginary method … Continue reading
Using full Lucene Query Syntax in Azure Search
The Azure Cognitive Search is the search engine in Microsoft Azure. You can search using a simple queries (default) which is good at doing full text searches, or you can use full syntax which is a Lucene query syntax. The … Continue reading
Posted in .NET Core, Microsoft Azure
Tagged .NET Core, Azure, Azure Cognitive Search, c#, Lucene
1 Comment
C# Set local folder for .net Core Windows Services
When developing .NET Core Worker Services, you can allow the service to run as Windows Service: The side effect is that the root folder changes from the local folder to the System32 folder, which means that any log files that … Continue reading
Manipulating XML Google Merchant Data using C# and LINQ
Receiving a Google Merchant Data feed (also known as a Google Product Feed) can be fairly easily manipulated on import time using a little C# and LINQ. The feed is basically a XML RSS 2.0 feed with some added properties … Continue reading
Posted in .net, .NET Core, c#, General .NET
Tagged c#, Google Merchant Data, Google Product Feed, LINQ, RSS 2.0, XML
Leave a comment