Tom Deseyn

Red Hatter working on .NET Core.

Recent Posts

Reduce application image build times with .NET Core incremental builds

Reduce application image build times with .NET Core incremental builds

In a previous article, we talked about using containers to build .NET Core application images to make our builds portable and reproducible. Because each build starts from scratch, some time is spent downloading and extracting NuGet packages.

One way to reduce build times is to add a local NuGet server; this brings packages closer to the build machines, which reduces the time to download the packages. In this article, we’ll look at how the new incremental build feature of the .NET Core S2I builder can further reduce build times.

Continue reading “Reduce application image build times with .NET Core incremental builds”

Share
Using .NET PInvoke for Linux system functions

Using .NET PInvoke for Linux system functions

If you’ve developed Windows applications with .NET, you may have found yourself in a situation where the framework did not provide the APIs you needed. When that happens, you first need to identify the system APIs and then make them available using PInvoke. A website like pinvoke.net provides copy-and-pasteable code snippets for many Win32 API functions.

.NET Platform Invoke (PInvoke) makes it easy to consume native libraries. In this article, we’ll take a look at using PInvoke for Linux system functions.

Continue reading “Using .NET PInvoke for Linux system functions”

Share
Using a local NuGet server with Red Hat OpenShift

Using a local NuGet server with Red Hat OpenShift

NuGet is the .NET package manager. By default, the .NET Core SDK will use packages from the nuget.org website.

In this article, you’ll learn how to deploy a NuGet server on Red Hat OpenShift Container Platform (RHOCP). We’ll use it as a caching server and see that it speeds up our builds. Before we get to that, we’ll explore some general NuGet concepts and see why it makes sense to use a local NuGet server.

Continue reading “Using a local NuGet server with Red Hat OpenShift”

Share
Building .NET Core container images using S2I

Building .NET Core container images using S2I

Red Hat OpenShift implements .NET Core support via a source-to-image (S2I) builder. In this article, we’ll take a closer look at how you can use that builder directly. Using S2I, you can build .NET Core application images without having to write custom build scripts or Dockerfiles. This can be useful on your development machine or as part of a CI/CD pipeline.

Continue reading “Building .NET Core container images using S2I”

Share
Locating special folders in cross-platform .NET applications

Locating special folders in cross-platform .NET applications

.NET has APIs for locating special folders that can be used for application and user configuration and data storage. They provide a convenient, portable way to make cross-platform applications find the appropriate folders on different operating systems. We’ll look at how Environment.GetFolderPath, Path.GetTempPath, and Path.GetTempFileName behave on Linux.

Continue reading “Locating special folders in cross-platform .NET applications”

Share
Securing .NET Core on OpenShift using HTTPS

Securing .NET Core on OpenShift using HTTPS

In an effort to improve security, browsers have become stricter in warning users about sites that aren’t properly secured with SSL/TLS. ASP.NET Core 2.1 has improved support for HTTPS. You can read more about these enhancements in Improvements to using HTTPS. In this blog post, we’ll look at how you can add HTTPS to your ASP.NET Core applications deployed on Red Hat OpenShift.

Before we get down to business, let’s recap some OpenShift vocabulary and HTTPS fundamentals. If you are familiar, you can skip over these sections.

OpenShift, pods, services, routes, and S2I

OpenShift is a Kubernetes-based open-source container application platform. A Kubernetes pod is a set of containers that must be deployed on the same host. In most cases, a pod consists of a single container. When we run the same application in several pods, a service does the load balancing across those pods. A route makes a service accessible externally via a hostname.

Continue reading “Securing .NET Core on OpenShift using HTTPS”

Share
Running Microsoft SQL Server on Red Hat OpenShift

Running Microsoft SQL Server on Red Hat OpenShift

In this blog post, we’ll set up Microsoft SQL Server on Red Hat OpenShift. We’ll use SQL Server to store data for a simple ASP.NET Core application running in a container deployed on OpenShift that manages a list of contacts. When we have that set up, we’ll use SQL Operation Studio to connect to the server running on OpenShift from our developer machine.

Continue reading “Running Microsoft SQL Server on Red Hat OpenShift”

Share