Reading request body in ASP.NET Core

Most of requests to controller actions of our ASP.NET Core applications send some simple parameters or some serialized model objects. But this is not always the case. There are also those requests we don’t want to map to models but we need the request body to process, save or use it some other ways. This blog post shows how to read request body in ASP.NET Core controller action.

Read more

New killer features planned for .NET Core, ASP.NET Core and Entity Framework Core 2.1

Microsoft announced roadmap for upcoming release of .NET Core family versioned as .NET Core 2.1. While there are some new features and many improvements coming I compiled a list of my favorites that I see as most imortant to all developers building solutions on .NET Core, ASP.NET Core and Entity Framework Core.

Read more

ASP.NET paging solution available at GitHub

Paging of data in ASP.NET and ASP.NET Core applications is timeless topic. It is invented over and over again and asked all the time in forums all over the world. Years ago I worked out kind of universal solution with reusable UI artifacts and I’m using these pieces this far. As ASP.NET Core is gaining more and more popularity I decided to start my sample solution with .NET Core and add full ,NET Framework and ASP.NET MVC 5 support later if asked.

Read more

Real-time talk between Windows 10 IoT Core background task and ASP.NET Core web application

My previous blog post introduced how to make ASP.NET Core 2 web application run on Windows 10 IoT Core. It was default web application created on Visual Studio and published as an executable. But this is not enough for IoT scenarios. When we build web application that runs on IoT board we need this application to do something. Be it displaying sensor data or controlling some hardware. This blog post shows how to make Windows 10 IoT background task talk with web application using WebSocket.

Read more

Running ASP.NET Core 2 applications on Windows 10 IoT Core

It has been problematic to run ASP.NET Core applications on Windows 10 IoT Core as it is not officially supported scenario yet and many components we are used with are not built with Windows 10 ARM in mind. Still it easy to run web applications on Windows 10 IoT Core using ASP.NET Core 2. There are few tricks developers should know when building web applications for Windows 10 IoT Core. This blog post is short guide about ASP.NET Core 2 on Windows 10 IoT Core

Read more

Running ASP.NET Core applications on Windows Subsystem for Linux

Windows 10 has something called Windows Subsystem for Linux and this something enables us to run Linux applications on Windows 10 using Linux without need for Hyper-V or other virtual machines. When building multi-platform applications like my open-source TemperatureStation solution then having Linux right there for testing comes very handy. This blog post shows how to get Linux running on Windows, how to install .NET Core and how to run web applications on Linux.

Read more

Defensive database context for multi-tenant ASP.NET Core applications

In multi-tenant applications where tenants share same data store cross-tenant operations must be avoided. There are many ways how bugs like this can happen. Be it hard to debug threading issue or some other complex situation, it is better when application components are ready for this kind of situations and better fail instead of going to glory end with illegal operations. This blog post introduces defensive database context that throws exception when data from other tenants is about to be updated.

Read more

Implementing database per tenant strategy on ASP.NET Core

Let’s continue with multi-tenancy in ASP.NET Core web applications and focus on solutions where every tenant has its own database. It’s not only about database – there can be more services where every tenant has its own instance. It makes solution provided here easily extendable to also other services besides SQL Server or any other relational database.

Read more

ASP.NET Core: Building enum provider to convert C# enums to JavaScript

My previous post about ASP.NET Core and getting C# enums to JavaScript was primitive and used simple attribute on enums to detect ones we need in JavaScript. This blog post extends the idea and makes some generalizations to support also those enums that are located in the libraries we don’t control or on what we don’t want to apply attribute.

Read more