Multipart Content-Type request results in IOException

Recently I’ve run into an ASP.NET Core MVC bug when an HTTP request with multipart content-type and empty body would cause an unhanded IOException exception to be thrown in MVC framework. However, when sending an invalid request I’d expect to receive a 400 error response code.

Continue reading Multipart Content-Type request results in IOException

Robi-kun – Assembling my first Robot

In this blog post I will share my experience of assembling, programming, and testing Robi-kun. Robi-kun is a Japanese toy robot which comes in parts from 70 magazines subscription. I’ve picked up an existing and half-done assembly, tested the assembled components, and completed the assembly to bring the robot to life :)

Continue reading Robi-kun – Assembling my first Robot

No RegionEndpoint or ServiceURL configured

I was setting up Amazon SQS client locally, and received No RegionEndpoint or ServiceURL configured exception. My goal was to load all AWS config values from environment variables together with a temporary session token, however I will go trough config file option as well. Apparently region value was not picked up by the Amazon SQS client.

Continue reading No RegionEndpoint or ServiceURL configured

Custom Authentication in ASP.NET Core 2.0

This blog post shows a quick example of implementing custom authentication in .NET Core 2.0 to secure your Web API. And in most cases you do want to secure your Web APIs, even though they were internal (micro)services only. If you don’t have a proper Identity provider e. g. Identity Server in place, and just need a quick solution, then a simple option is to validate Authorization header against a hardcoded value.

Continue reading Custom Authentication in ASP.NET Core 2.0

Change auto-named SQL constraint

If you’ve ever tried to change a default value of a SQL constraint you’ve probably noticed that you have to drop the constraint, and then re-create the constraint with a new default value. However, what if you found an auto-named SQL constraint, and you started wondering how your SQL script will work across different environments with different databases…

Continue reading Change auto-named SQL constraint