Exploring Program.cs, Startup.cs and CreateDefaultBuilder in ASP.NET Core 2
How to Automate Reload Configuration in ASP.NET Core
One of the goals in ASP.NET Core 2.0 has been to clean up the basic templates, simplify the basic use-cases, and make it easier to get started with new projects. This is evident in the new Program and Startup classes, which, on the face of it, are much simpler than their ASP.NET Core 1.0 counterparts. In this post, I’ll take a […]
What Changed on ASP.NET Core Logging?
In this article, I want to explore IOptionsSnapshot and show how to work with IOptionsSnapshot in ASP.NET Core 1.1. We will use the dot-net CLI to create a new project and configure it using the reload technique in combination with IOptionsSnapshot. Make sure you are using at least ASP.NET Core 1.1. Get started by creating […]
ASP.NET Core – How it Works?!
If you are getting started with ASP.NET Core, you are probably wondering what has changed with logging. In short, the answer is both nothing and everything. The common logging libraries you have always used with .NET still work. Microsoft does provide its own interface for logging with .NET Core and it uses it for .NET […]
ASP.NET Core Tutorial – Status Code with Empty Response
The hosting model for ASP.NET Core is dramatically different from previous versions of ASP.NET. This is also one area where I’ve seen a fair amount of misunderstanding. ASP.NET Core is a set of libraries you can install into a project using the NuGet package manager. One of the packages you might install for HTTP message […]
If you create JSON APIs, you know that sometimes it is useful to return empty response with just status code set. For example when user calls the API to get a document with id 123 and he doesn’t have the rights to this particular document, it is a good practice to return with a status ‘403 Forbidden’. When you […]