Quantcast
Channel: Damir's Corner
Browsing all 484 articles
Browse latest View live
↧

Image may be NSFW.
Clik here to view.

NuGet CPM when using Git submodules

I've written about NuGet Central Package Management in the past, but since then there were some news in this field. Most importantly, the .NET Upgrade Assistant Visual Studio extension and command line...

View Article


Parallel builds for .NET projects

I had the pleasure of troubleshooting an issue that occurred on our build server after we tried to improve performance by parallelizing the build. We need to build the same project in several...

View Article


Image may be NSFW.
Clik here to view.

Date HTTP header formatting

As we were implementing date formatting for the Date HTTP header in .NET, a Java developer warned us to double-check if we really want to use the built-in RFC 1123 format specifier for that. It turned...

View Article

Image may be NSFW.
Clik here to view.

Logging from .NET to Elasticsearch

Although you might have not heard often of Elasticsearch being used for collecting logs from a .NET application, the scenario is well-supported. The setup is simple and it works good. There is an...

View Article

Don't return IEnumerable from action methods

I already wrote about the potential dangers of using the IEnumerable interface in the past. But I recently encountered a bug related to it which I found worth sharing. It caused the exception filter in...

View Article


Required properties and nullable reference types

When you enable nullable reference types for an existing Web API project, it changes how properties in request bodies are validated. This can easily break your application if you don't modify your...

View Article

Value types in web API models

If you use non-nullable value types (e.g., enums) in web API models, you probably aren't getting the behavior you are expecting, both for required and for optional properties. I find it better to...

View Article

Addressing the CA1515 warning in .NET 9

In one of my hobby projects, I have all the code analysis rules enabled and treat all warnings as errors. As I tried to build it with .NET SDK 9 for the first time, it failed with many CA1515 errors:...

View Article


Memoization for a recursive function in F#

This year I decided to solve the Advent of Code puzzles using F#, the functional programming language for .NET. Since I had very little previous experience with F#, this meant a lot of learning about...

View Article


Image may be NSFW.
Clik here to view.

Terminal profiles in IDEs

I spend a significant part of my work day in a terminal. That's why I have it configured to suit my needs with a collection of several useful modules which I occasionally still extend. Although all...

View Article

Image may be NSFW.
Clik here to view.

OpenTelemetry collection during development

OpenTelemetry is a standard for collecting all types of observability data: logging, tracing and metrics. There is an increasing number of tools that can collect OpenTelemetry data emitted from...

View Article

Image may be NSFW.
Clik here to view.

VS HTTP files break OpenTelemetry tracing

As I was preparing a sample ASP.NET Core Web API project to test the Grafana OpenTelemetry Docker image with, tracing for some reason didn't work for me. It took me a while to realize that the problem...

View Article

Processing Git changes in GitHub Actions

I decided to automate posting announcements to social media platforms when I publish a new blog post. Since I'm already using GitHub Actions to publish blog posts on schedule as well as deploy any...

View Article


Implementing a private JavaScript GitHub action

In my quest to automate announcing of new blog posts to social media using GitHub Actions I managed to find existing actions for most steps in the process. However, the act of composing the final...

View Article

Image may be NSFW.
Clik here to view.

Posting to social media from GitHub Actions

The final step in my efforts to automatically announce new blog posts to social media from GitHub Actions was the actual act of posting the prepared message to selected social media platforms. After a...

View Article


API-compatible data type change

A recent business requirement demanded an unexpected change to a web API endpoint. A numeric field in the request body had to accept a set of predefined string values in addition to numeric values. I...

View Article

HTTP client rate limiting with Polly

One usually thinks of rate limiting in a server-side context, i.e., a service limits the rate of incoming requests. Well, we recently had to add client-side rate limiting to our service, i.e., limit...

View Article


Image may be NSFW.
Clik here to view.

Web API file upload with metadata

In my experience, file upload is not a very common operation in REST APIs. But when you are dealing with files, JSON requests aren't the best approach. Unless your files are text only or very small,...

View Article

Traefik reverse proxy for Docker

When I needed a reverse proxy to publicly expose a couple of web applications running in Docker, I decided to use Traefik after doing a short research. Now that I successfully configured it, I don't...

View Article

HTTP resilience wrapper for Polly

In response to my blog post about client rate limiting with Polly, a colleague brought Microsoft's HTTP resilience NuGet package to my attention. When I took a closer look at it, I was surprised that...

View Article
Browsing all 484 articles
Browse latest View live