Teemablogi sissekanded

05.09.2019

NHibernate on ASP.NET Core

NHibernate has been my favorite ORM for long time. Although it’s more complex for beginners than Entity Framework it’s more matured and many developers consider it to be practially an industry standard. NHibernate works with ASP. NET Core too. This blog post shows how to use NHibernate in ASP. NET Core MVC applications. I was pleasantly suprised seeing that NHibernate is now on. 08:00 05.09.2019 kanalilt DT blogi 2

04.09.2019

Create thumbnails using Azure Cognitive Services

Azure Cognitive Services is set of powerful and intelligent cloud services to analyze photos and images. This blog post shows how to create smart thumbnails using Azure cognitive services and ASP. NET Core. Why thumbnail service? Back in time I had to argue with one customer about how thumbnail should be done. There was popular misconception that GetThumbnailImage() method in. 12:41 04.09.2019 kanalilt DT blogi 2

20.08.2019

Visualize Azure CDN metrics with Grafana

Azure CDN is one of Azure services that doesn’t provide charts and metrics in service overview page. For me these charts are important because they help me to optimize delivery of my blog artifacts. This blog post describes how I visualize Azure CDN diagnostics logs using InfluxDB, Grafana and simple data collector. 12:14 20.08.2019 kanalilt DT blogi 2

16.08.2019

System memory health check for ASP.NET Core

I found temporary cross-platform solution for . NET Core to read system memory metrics until framework level libraries appear. This blog post shows how to build ASP. NET Core health check for system memory metrics. Getting started We are using MemoryMetricsClient class defined in blog post referred above. The class with MemoryMetrics result is given here again. 08:06 16.08.2019 kanalilt DT blogi 2

15.08.2019

Reading Windows and Linux memory metrics with . NET Core.

Until . NET Core gets its own cross-platform system metrics support I needed something simple to get system memory metrics of servers where ASP. NET Core application is running. I wasn’t able to find a nice solution but I still worked out something to get system memory metrics with . NET Core on Windows and Linux. My scenario I solved both cases by using simple command line. 22:27 15.08.2019 kanalilt DT blogi 2

14.08.2019

Getting started with Jekyll blog hosted on Azure static website

Building fully static web sites and blogs is possible anno domini 2019 and I tried out how it works using Jekyll and Azure services. My goal as a tech guy was keeping things small and automate as much as possible. After few days of experimenting I came out with beast solution described here. Live demo and source are available! Live demo of Jekyll static blog is here: https://jekyll. gunnarpeipman. com. 06:40 14.08.2019 kanalilt DT blogi 2

Setting up Azure storage static website for Jekyll

Before setting up Jekyll build and release pipelines on Azure DevOps we need static website service on Azure. It’s special feature of blob storage. This blog post shows how to set up and manage Azure static website. Live demo and source are available! Live demo of Jekyll static blog is here: https://jekyll. gunnarpeipman. com. Source code with sample content is available at my Github repository gpeipman/JekyllBlog. 06:33 14.08.2019 kanalilt DT blogi 2

Azure DevOps build pipeline for Jekyll

We have Git repository and Azure static website set up. It’s time to connect these two with Jekyll build and release pipelines to automate publishing from our machine to static website. This part of series focuses on Jekyll build pipeline. Live demo and source are available! Live demo of Jekyll static blog is here: https://jekyll. gunnarpeipman. com. 06:24 14.08.2019 kanalilt DT blogi 2

Azure DevOps release pipeline for Jekyll

Previous post in series focused on setting up Jekyll build pipeline. After successful build we have new version of blog waiting for publishing in build artifacts folder. This post shows how to publish Jekyll static blog to Azure static website using Azure DevOps release pipeline. Live demo and source are available! Live demo of Jekyll static blog is here: https://jekyll. gunnarpeipman. com. 06:12 14.08.2019 kanalilt DT blogi 2

Taking Jekyll static blog live with Azure CDN and custom domain

Our Jekyll blog is published to Azure static website automatically using Jekyll build and release pipelines. We can access site through Azure storage URL. To go live we want to use custom domain and we need Azure CDN for this. Here is how to do it. Live demo and source are available! Live demo of Jekyll static blog is here: https://jekyll. gunnarpeipman. com. 06:00 14.08.2019 kanalilt DT blogi 2

12.08.2019

Blazor form validation

Client-side Blazor supports DataAnnotations form validation out of box. It’s simple and intuitive but also very flexible – if needed we can use the same mechanism to replace DataAnnotations validation with some other validation component. This blog post introduces form validation in Blazor applications and peeks also into engine of validation mechanism. NB! Form validation in Blazor is experimental and subject to changes. 18:42 12.08.2019 kanalilt DT blogi 2

09.08.2019

Self-contained executable with . NET Core 3. 0 on Windows, Linux and Raspberry.

NET Core 3. 0 comes with support for self-contained executables. It means we can publish applications as a single executable for specified platform. Also trimming – removing of unused code from assemblies – is supported. This blog post demonstrates how to build self-contained executable using . NET Core 3. 0. NB! As of writing this post the current version of . NET Core 3. 0 is Preview 7. 08:00 09.08.2019 kanalilt DT blogi 2

08.08.2019

Displaying ASP. NET Core health checks with Grafana and InfluxDB.

After finishing my writing about ASP. NET Core health checks I started finding a way how to visual health check results so I can display these on the wall mounted TV or big screen. This blog post introduces how to visualize ASP. NET Core health checks with Grafana and InfluxDB. 08:00 08.08.2019 kanalilt DT blogi 2

07.08.2019

Dependency Injection in Azure Functions

Azure Functions V2 supports ASP. NET Core like dependency injection. It is specially good if we write functions that are wrappers for shared libraries and components we are also using in web and other applications of our solution. This blog post shows how to use dependency injection in Azure Functions. To get started with code check out Azure Functions with DI Github repository by @MikaBerglund. 08:00 07.08.2019 kanalilt DT blogi 2

06.08.2019

Creating vCard in ASP.NET Core

It’s time to get back to old era of this blog and bring my vCard action result to today’s ASP. NET Core world. There’s also support for images so we can provide really good looking vCards from ASP. NET Core applications. This blog post gives a good base for custom vCard solutions in ASP. NET Core. Classic ASP. NET MVC version of this solution is described in my blog posts Creating vCard with image in. 08:00 06.08.2019 kanalilt DT blogi 2

05.08.2019

ASP.NET Core: Inject all instances of interface

We all probably know how to inject instance of interface to class using dependency injection in ASP. NET Core. But how can we inject all instances of interface to some class, let’s say controller? The trick is simple and it’s shown in this blog post. NB! Code here is written on ASP. NET Core 3. 0 Preview 7 but is also works with previous ASP. NET Core versions. 08:00 05.08.2019 kanalilt DT blogi 2

01.08.2019

Building ASP. NET Core “Hello, blinky” IoT application.

After installing ASP. NET Core 3. 0 on Windows 10 IoT Core and getting my ASP. NET Core 3. 0 LED controlling application work I wanted to finish this journey with some classics – Hello, blinky application. Source code for ASP. NET Core “Hello, blinky” is available in my Github repository gpeipman/AspNetCoreHelloBlinky. Feel free to explore the code and make it work on your board. Controlling LED with ASP. NET Core 3. 08:39 01.08.2019 kanalilt DT blogi 2

30.07.2019

Turning LED on and off with ASP. NET Core 3. 0 on RaspberryPi.

After getting . NET Core SDK and ASP. NET Core 3. 0 work on my RaspberryPi and Windows 10 IoT Core I wanted to try out if I can communicate with some electronics right from web application. It is possible and here is how to do it. Sample solution with code shown and discussed here is available at my Github repository gpeipman/AspNetCore3LedOnOff. It has a little bit more code and LED can be controlled from web application home page. 07:05 30.07.2019 kanalilt DT blogi 2

29.07.2019

Avoiding ping flood in ASP.NET Core health checks

Thing I left out from my post about ASP. NET Core health checks was the old legacy system we all know. It works and nobody wants to touch it. Other systems must be very careful with it because it is easy to break it down with load. Of course, there’s no way for us to replace or fix the elder monster. Here’s how to make sure we don’t take it accidentally down with too frequent ping checks or ping flood. Quick jump to ASP. 08:00 29.07.2019 kanalilt DT blogi 2

26.07.2019

Installing ASP. NET Core 3. 0 on RaspberryPi and Windows 10 IoT Core.

ASP. NET Core 3. 0 will run on RaspberryPi and other boards out of the box. There are also SDK binaries available in . NET Core 3. 0 download page. Having full SDK available on RaspberryPi means that we can now build applications on board. Let’s see how it works. Previously we were able to build and publish ASP. NET Core applications for Windows 10 IoT Core like described in my blog post Running ASP. 09:05 26.07.2019 kanalilt DT blogi 2