.NET Core and KnockoutJS web application

From all different solutions for various problems I’ve implemented in the past I wanted to create a simple web application that I could get back to for reference any time, and this would be a fully working KnockoutJS web application. The idea was to implement a simple client contacts management application using .NET Core 1.1, Entity Framework Core 1.1, KnockoutJS, and MSTest + Jasmine for unit testing.

Continue reading .NET Core and KnockoutJS web application

IHttpContextAccessor and Exceptions handling

Recently I’ve been working on several small .NET Core web apps and was looking for two things. Firstly, a way to access Session in a data service directly, and not just by passing HttpContext reference down from controller. And secondly, log any unhandled exceptions that occur in the application. And the answer to both questions was IHttpContextAccessor interface!

Continue reading IHttpContextAccessor and Exceptions handling

Jasmine mock for data service in Knockout

Using RequireJS makes life easier injecting dependencies like data services into Knockout components. However, there is no direct way of unit testing calls to such data services and need a different approach to be able to create a jasmine mock for an injected data service.

Continue reading Jasmine mock for data service in Knockout

Create self-signed multi-domain SSL certificate

Running microservices under HTTPS locally and in development environment with several domain names requires to have self-signed multi-domain SSL certificate. Also, starting from Google Chrome v58 SSL certificates are required to have SAN specified to avoid any SSL warnings. Luckily, there is a PowerShell script to make it quick and easy.

Continue reading Create self-signed multi-domain SSL certificate

Visual Studio 2017 StyleCop Analyzers template for .NET Core

With the new Visual Studio 2017 out you might have been busy upgrading your .NET Core solutions to the new format and accidentally found out that StyleCop Analyzers stopped working? Automated upgrade will just upgrade projects, however will not adjust Visual Studio 2017 StyleCop Analyzers settings. Therefore, I’ve updated my template’s source code and added this quick guide.

Continue reading Visual Studio 2017 StyleCop Analyzers template for .NET Core

Migrate away from Facebook app to Disqus comments

I was helping one old university project and as part of user experience and SEO tweaks we decided to move away from Facebook app comments to Disqus comments. The main reason was problems with comments/replies not appearing on the website, and on top of this we wanted to boost SEO having comments that could be indexed by search engines.

disqus comments

Continue reading Migrate away from Facebook app to Disqus comments