CodingBlast

Programming articles about .NET, ASP.NET Core, JavaScript, TypeScript, and related developer tooling.

How to set up perfect command-line environment on Windows

Windows Terminal First of all, you should install Windows Terminal. It is a modern terminal emulator for users of command-tools and shells, including PowerShell, bash within WSL, SSH, Command Prompt, and any other command-line app....

Why is ASP.NET Core good for Enterprise applications

Speed ASP.NET Core is by far the fastest full-stack major web framework out there. Full-stack, meaning a framework that provides wide feature coverage, including server-side templates, database connectivity, form processing, and so on. Major means...

ASP.NET Core Dependency Injection - Cannot consume scoped service

When working with ASP.NET Core and it's Dependency Injection container, you will likely run into an error that's similar to this one: Some services are not able to be constructed (Error while validating the service...

Hosting ASP.NET Core on Heroku (with Docker&CircleCI) for free

The problem You have an application that you need to show off to your friends or a client, and they all need to access it online, and you don't want to use your old server...

More C# 7 goodness - Span of T - Span<T>

Introduction With C# 7.2 we got a new type: Span&lt;T&gt;. So, what is Span? Span is a new value type that enables us to work and manage any type that represents a contiguous chunk of...

ASP.NET Core Authorization - Using attributes for handlers and requirements

Introduction Dealing with authentication and authorization in ASP.NET Core while working with modern web apps has been a much better experience than in older versions of ASP.NET. And it's been further improved with v2. There...

JavaScript Collections - Set and Map

Introduction In this post we will get familiar with two different collections in JavaScript: Set Map In one of the next posts we will also talk about two similar collections: WeakSet WeakMap They were all...

ASP.NET Core 2 - Global Model validation

How we (some of us?) do Model validation right now We, developers, use a lot of repetitive code in our ASP.NET (Core) Web API / MVC actions. Inside of our controller actions we usually check...

ASP.NET Core - Unit testing IAuthorizationService and dependencies inside of your controller

Unit Testing - IAuthorizationService, Requirement and Handler You have a controller that makes use of IAuthorizationService and you have a custom requirement - implementation of IAuthorizationRequirement. You might also have your custom handler which is...

ASP.NET Core - InvalidOperationException: Cannot find compilation library location for package 'Microsoft.Win32.Registry'

TL;DR Add following line to your .csproj file: &lt;MvcRazorExcludeRefAssembliesFromPublish&gt;false&lt;/MvcRazorExcludeRefAssembliesFromPublish&gt; Introduction I was publishing a project I am working on to web server (Linux) and I had an issue with Razor Pages. However, it seems that...