Quantcast
Channel: General .NET – Brian Pedersen's Sitecore and .NET Blog
Browsing latest articles
Browse All 170 View Live

Convert JSON Arrays into batches of JSON Arrays using the LINQ Chunk method

This is one way of converting a JSON array of any JSON objects into batches. This function uses the LINQ Chunk method to convert a 1 dimensional array input into a 2 dimensional array output: Example...

View Article


C# POST x-www-form-urlencoded using HttpClient

To POST x-www-form-urlencoded data in C# using the HttpClient, you can do the following: using System.Net.Http; private static HttpClient _httpClient = new HttpClient(); public async...

View Article


Connect to Salesforce Data Cloud Ingestion API using C# and HttpClient

As a C# developer, to properly connect to Salesforce Data Cloud, you need to do 3 steps: Request an Access Token using the credentials provided for you. Exchange the Access Token for a Data Cloud...

View Article

Image may be NSFW.
Clik here to view.

Azure Table Storage Create Read Update Delete entities – a base class...

Azure Table Storage is a simple way of storing structured data with no relations (also known as structured NoSQL data) in a storage account. Think of it as an spreadsheet with 2 mandatory keys (a...

View Article

C# Serialize HttpRequest to Model Class in Azure Functions

The signature of Http triggered Azure Functions include a HttpRequest: [Function("MyFunction")] public async Task<IActionResult> Run([HttpTrigger(AuthorizationLevel.Function, "post")]...

View Article


Image may be NSFW.
Clik here to view.

C# Use Microsoft Entra ID JWT token as Authentication in .net API

You can use Microsoft Entra ID to create a client secret that allows an application to access your API using a bearer token. STEP 1: SETUP A CLIENT SECRET IN MICROSOFT ENTRA In Microsoft Entra, take a...

View Article

Image may be NSFW.
Clik here to view.

C# CosmosDB spatial geographic search using GeoJSON coordinates

If you have data in an Azure CosmosDB, it is possible to perform spatial location based searches, returning documents within a distance from a point, or within a certain area. The first thing you...

View Article

C# Azure Functions in .NET Isolated Mode does not read host.json file

So it turns out that all of my grieves with Azure Functions and logging to Application Insights are based around the fact that the settings from host.json is not being read, because the host.json file...

View Article


Azure Functions in Isolated Mode and Application Insights

As per current (2026-02-10) there seem to be an issue where Application Insights cannot read loglevels from the host.json file. So If you wish to filter messages from System.Net.Http.HttpClient for...

View Article


C# Convert GeoJSON FeatureCollection to SqlGeography for SQL Server

When working with geographic data in .NET, you often receive geographic shapes as GeoJSON – the standard format used by tools like geojson.io and MapTiler. To store and query this data in Microsoft...

View Article
Browsing latest articles
Browse All 170 View Live


Latest Images