Posts

Showing posts from January, 2026

ASP.NET Core Pitfalls - Content Type Mismatch

Introduction To get the new year started, another post on my ASP.NET Core Pitfalls series! This time, it's related to APIs, and how the [Consumes] attribute is interpreted. The Problem The Content-Typ e header and optional charset parameter are part of the web standard and used to tell the server handler what type of content the client will send. The charset part is optional, and the default is " ascii "; for example, if we wish to set it as UTF-8 , we should sent: Content-Type: application/json;charset=utf-8 Now, charset is optional, and does not really change what the content type is, just the character set of the text of the payload. In ASP.NET Core, it can be used to route the request to different endpoints: for example, two action methods for the same action can consume different content types. There is an attribute,  [Consumes] , which can be used in ASP.NET Core MVC to restrict the content types that are accepted by a given action method. [HttpGet("Get...

2025 in Retrospective

So, 2025 has come to an end, and we are already in 2026!  To me, 2025 was a very important year, for some reasons: I stopped using my old blog,  https://weblogs.asp.net/ricardoperes . This is essentially because Microsoft/Neudesic stopped supporting it. Most contents are still there, but there are some that are unavailable, and I don't think there's much we can do about it. Some of these contents were migrated to my new blog (here where you are reading this) Got back to posting regularly here, in some weeks, I even published more than one post Started my PhD ! I intend to write more about it soon Kept on being a Microsoft MVP ! In 2025 I published ~50 posts, of which: 1 was on GitHub Actions (my first one on this topic) 2 were on ASP.NET Core pitfalls (more to come) 2 were on EF Core pitfalls (more to come) 2 were on ASP.NET Core extension points (more to come) 2 were on OpenTelemetry and Metrics 3 were on multitenancy (more to come) 4 were non-technical, announcements or com...