Blog Posts

Sdk Projects And Assets Json

Aug 17th, 2018

Last week I encountered an issue with MSBuild while trying to run it from command line. The issue did not appear when using VisualStudio right click + build but only appeared when using msbuild.exe CLI directly with a clean project.

Aspnetcore 2.1 Apicontroller

Aug 10th, 2018

ASP NET Core 2.1 brings a set a enhacements for Web API development, Web API being a service accessible via HTTP and returning result in Json format. Those enhancements aim to simplify the composition of those APIs and also remove unecessary functionalities. Today we will explore those enhancements.

Update Npm Packages With Ncu

Aug 3rd, 2018

Frontend libraries progress very rapidly. After just one month, a project can see all its packages needing an upgrade. Today we will see how we can figure which packages need to be updated and how to do it.

Angular With Signalr Core

Jul 27th, 2018

Last week we saw how to configure SignalR and get a server notifying a client built as Razor page via Websockets. We completed the post by having a fully functional backend setup with SignalR and authentication done via Resource Owner Password. Today we will see how we can connect to SignalR hub from an Angular application and demonstrate how we can authenticate.

Manage Aspnetcore Configuration With Systemd

Jul 24th, 2018

Managing configurations can be challenging. We cannot simply check-in in our repository secrets and connection strings and at the same time we want an easy way to maintain them. Today we will see how we can manage secrets is am easy way on Ubuntu with systemd.

Debug 502 Bad Gateway Nginx

Jul 22nd, 2018

When proxying a request to an underlying server, it is necessary to validate its SSL certificate. For example, if we have a process running on https://localhost:5001, we can configure Nginx to validate the certificate used by localhost:5001. But if we miss one step, we face the common error 502 Bad Gateway returned by Nginx. Today we will see two scenarios where we can face the error and how to fix them.

End To End Encryption Between Nginx Aspnetcore Kestrel Angular

Jul 20th, 2018

Internet is moving toward secure connections whereby HTTPS is a priority. Browsers are now warning users when navigating to non secured website. With this movement, Kestrel and ASPNET Core have adopted the mentality of security by default rather than security when needed. HTTPS will now be the default and HTTP will be a necessity due to implementation constraints. Together with Lets Encrypt and ACME protocol, we do not have excuses for not implementing an SSL connection.

Httpclientfactory Aspnetcore

Jul 16th, 2018

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.

Signalr Aspnetcore

Jul 13th, 2018

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.

Debug Dotnet Version Installed

Jul 8th, 2018

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.

Fix Redirect Localhost

Jul 7th, 2018

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

Self Signed Certificate For Identity Server

Jul 6th, 2018

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.

Serilog Setup For Multi Environments

Jun 29th, 2018

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.

Gitlab Pipeline

Jun 22nd, 2018

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.

Configure Webpack To Compile Bootstrap

Jun 15th, 2018

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.

Designed, built and maintained by Kimserey Lam.