Aug 17, 2018

Sdk Projects And Assets Json

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.

DotNetCore

Aug 10, 2018

Aspnetcore 2.1 Apicontroller

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.

DotNetCore CSharp

Aug 03, 2018

Update Npm Packages With Ncu

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.

NPM

Jul 27, 2018

Angular With Signalr Core

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.

DotNetCore CSharp

Jul 24, 2018

Manage Aspnetcore Configuration With Systemd

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.

DotNetCore CSharp Ubuntu

Jul 22, 2018

Debug 502 Bad Gateway Nginx

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.

NGINX

Jul 20, 2018

End To End Encryption Between Nginx Aspnetcore Kestrel Angular

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.

NGINX DotNetCore CSharp Angular Let's Encrypt

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.