Jul 16, 2018

Httpclientfactory Aspnetcore

ASP.NET Core 2.1 ships with a factory for HttpClient called HttpclientFactory. This factory allows us to no longer care about the lifecycle of the HttpClient by leaving it to the framework. Today we will see few ways of instantiating clients.

DotNetCore CSharp

Jul 13, 2018

Signalr Aspnetcore

SignalR is a framework from ASP NET Core allowing us to establish a two way communication between client and server. This two way communication allows the client to send messages to the server but more importantly allows the server to push messages to the client. SignalR makes use of Websocket when available else it falls back to SSE or pulling. Today we will focus on how to setup SignalR to work with WSS, Websocket secure and how we can authenticate the user requesting to connect to our SignalR hub via Websocket.

DotNetCore CSharp

Jul 08, 2018

Debug Dotnet Version Installed

To check your dotnet version installed, use dotnet --info. This command will display the SDKs and runtimes installed on your system together with the path where they can be found.

DotNetCore

Jul 07, 2018

Fix Redirect Localhost

This post shows how to fix an annoying automatic redirect issue in localhost.

Jul 06, 2018

Self Signed Certificate For Identity Server

To sign our JWT tokens, Identity Server 4 requires a signing credential. Today we will see how we can create our own key and provide it to Identity Server to be used as signing credential.

DotNetCore CSharp OIDC

Jun 29, 2018

Serilog Setup For Multi Environments

Few months ago we saw how to get started with Serilog. We discovered what was Serilog and the different concepts of settings, enrichers and sinks. Today we will see how we can take Serilog further and configure a logging mechanism for an application running in multi environment.

DotNetCore CSharp

Jun 22, 2018

Gitlab Pipeline

Few weeks ago I explained how we could setup a CI/CD pipeline whereby the runner would be on Windows and the last stage was to package the application. Today we will see how we can setup a runner on Ubuntu CI server and use it to build and deploy an ASP MET Core application onto a Ubuntu 16.04 server.

GitLab

Jun 15, 2018

Configure Webpack To Compile Bootstrap

Few weeks ago I talked about LibMan which was a tools preinstalled on Visual Studio 2017 preview allowing local download of cdnjs minified css/js. Today I will show how we can configure Webpack with npm to manage libraries like Bootstrap and minify both css and js while applying all its good algorithm like tree shacking.

Jun 08, 2018

Minio Grain Storage For Microsoft Orleans

Grains states in Orleans are stored in a grain storage. Orleans ships with multiple highly available storage implementation like Azure blob storage or AWS Dynamodb. Today we will see how we can implement our own grain storage which will store grains on Minio, an open source free private cloud storage.

DotNetCore CSharp

Jun 01, 2018

Proxy Aspnetcore With Nginx

Few weeks ago I showed how to host ASP NET Core on Windows Server behind IIS. Compared to Windows Server, Ubuntu with nginx offers a quicker way to get started and a better control over the kestrel process. Today we will see how to host an ASP NET Core application on Ubuntu.

NGINX DotNetCore CSharp

May 25, 2018

Manage Kestrel Process With Systemd

Kestrel is a lightweight standalone process. In order to host it on Linux, the recommended approach is to install it as a service. Systemd is a group of tools providing functionalities to manage processes on Ubuntu. Today we will see how we can manage an ASP NET Core application together with its Kestrel process using systemd tools.

DotNetCore CSharp Ubuntu

May 18, 2018

Useful Bash Commands

Since I have installed Ubuntu as a subsystem, I see myself using more and more bash. The reason being that all the VMs I spin up are Ubuntu VMs. My interactions with my servers are very basic but even for those, there are many beautiful commands which ease my interactions. Today I would like to go through the commands and tips which I use on a daily basis.

Ubuntu

May 11, 2018

Visual Studio Libman

Few weeks ago I discussed how we could create a healthchek library which would return json status of our application. Using the json, I wanted to make a quick page to display healthchecks in a nice visual. I wanted to quickly add Bootstrap and momentJS. For frontend libraries, I was used to use Bower as it nicely put every frontend package in /bower_components which can be served as static data. But since Bower was announcing that it was no longer supported and requested to use Yarn or NPM, I started to look around for an easier solution than those as I don’t really care about source code of the frontend libraries, all I want is the latest compiled versions. After few minutes of research, I found out that the team in Microsoft felt the same way as I did and already worked on a tool called Library manager (libman) and is available in VS Preview for the moment. Libman gives the benefit to allow developers to download locally the latest compiled version of the CSS or JS of their preferred frameworks for frontend usage. We can see Libman as a CDN file management for local usage. Today I will show how it can be used and combined with Razor pages to bring quickly pages to life.

DotNetCore CSharp

May 04, 2018

Async Versus Subscibe

Over the past year, working in companies using Angular, many times have I been in situations where I was asked to explain the differences between async pipe and .subscribe in Angular. More precisely explain my standpoint which is to always use async pipe when possible and only use .subscribe when side effect is an absolute necessity. The challenge in explaining this comes to how to convince without giving an hour boring lesson of why side effects in logic are hard to maintain and how prematured .subscribe forces developers to make unecessary side effects. So today I would like to talk about that and provide explanations which I hope will help to understand which to use.

Angular NGRX

Apr 27, 2018

Implement Healthcheck In Aspnetcore

Healthchecks are used to assess the health of an application. There are multiple level of checks which can be implemented, the first level being whether the application is itself running. The second level being whether the application dependencies, services, databases, files, are accessible by the application. Last level being whether the process itself is healthy, consumes a reasonable amount of CPU/RAM. Today we will see how we can implement a simple healthcheck middleware for ASP NET Core.

DotNetCore CSharp