Mindful Codes Blog

Azure Active Directory with Swashbuckle in ASP.NET Core 0

Azure Active Directory with Swashbuckle in ASP.NET Core

Swashbuckle is a great tool to create documentation of your APIs developed with ASP.NET Core. I had a blog post before about Swagger in ASP.Net core in general here but today I am going to talk...

HSTS policy with ASP.Net Core 2.1 0

HSTS policy with ASP.Net Core 2.1

One of the novelties of ASP.NET Core 2.1 is that it automatically redirects all traffic from HTTP to https and, in addition, forces the use of HSTS. I am sure you know HTTPS well...

ASP.NET Core 2.1 application in Docker with HTTPS enabled 0

ASP.NET Core 2.1 application in Docker with HTTPS enabled

In one of my previous blog posts, I talked about using HSTS in ASP.Net Core application, today we look into how to deploy ASP.NET Core 2.1 application in Docker with HTTPS enabled. If you want to...

Debug netcore running in WSL with VS2017 0

Debug netcore running in WSL with VS2017

Today I had to face the painful situation of a code in netcore that worked correctly in my machine (Windows 10) but that when running in Docker it failed miserably. I decided to dedicate...

Container Runtimes 0

Container Runtimes

One of the most frequent questions that they ask me about containers is to what extent they penalize performance. It is a very logical question because, in the end, the containers offer a certain...

C# variance in delegates 0

C# variance in delegates

Alright! I had a handy experience in a project (of which I will speak later) which I have decided to share it with you guys and it is about C# Variance in delegates. When...

How to Test Webhooks using ngrok 0

How to Test Webhooks using ngrok

Webhooks are an inter-application notification mechanism. For example, GitHub can notify an application via an HTTP request after each commit on a repository. The notified application can thus perform an operation immediately after the...

Avoid returning null in your code 0

Avoid returning null in your code

If you have read the book “Clean Code: A Handbook of Agile Software Craftsmanship” by Robert C. Martin, you know that how things could go wrong when you return null from a method! This time I...

ASP.NET Core: npm error when generating a Docker image of a project created with the React template 0

ASP.NET Core: npm error when generating a Docker image of a project created with the React template

I have seen this problem with a project generated from the React SPA template, but maybe it can be applied to other SPA templates (such as Angular). The error can be reproduced very easily....

Conversions (explicit or implicit) and interfaces in C# 0

Conversions (explicit or implicit) and interfaces in C#

One of the most useful, although more potentially dangerous, features of C# is the possibility of overloading the conversion operators ( casting ) and specifically the implicit conversion. Being able to overload the explicit...