Secure an ASP.NET Core api with Firebase

August 22, 2017 · security firebase

Introduction Update: Updated the code samples according to the changes introduced in .NET 2.0. Firebase is an application development framework and infrastructure provided by Google. It offers a handful of services, like Storage, Analytics, Notifications and Hosting, mainly targeted »

Troubleshooting high memory usage with ASP.NET Core on Kubernetes

August 17, 2017 · kubernetes .net-core

At work we are running several ASP.NET Core APIs on the hosted version of Kubernetes in the Google Cloud (GCE—Google Container Engine). In almost all of our components we noticed that they had unreasonably high memory usage. The »

Running ASP.NET Core in auto-scaling containers? Warm up!

July 29, 2017 · web api kubernetes

ASP.NET Core APIs are not warmed up by default. This is easy to illustrate, let's scaffold a brand new empty api. mkdir warmuptest cd warmuptest dotnet new webapi dotnet restore dotnet run Then let's do two consecutive requests against »

Tear down your ASP.NET Core api between integration tests

June 21, 2017 · c# integration-testing testing couchbase

The way to write integration tests for ASP.NET applications has been made much easier with the advent of ASP.NET Core. This is mainly due to the programming model becoming super modular, which means that it is really easy »

Two gotchas with scoped and singleton dependencies in ASP.NET Core

April 17, 2017 · c# dependency-injection

With ASP.NET Core a new built-in lightweight Dependency Injection framework was introduced in the Microsoft.Extensions.DependencyInjection package, thus in ASP.NET Core applications we don't necessarily need an external library such as Ninject or Unity to do DI, »

Jumpstart F# web development: F# with ASP.NET Core

February 26, 2017 · f#

In this third part of the series we'll look at how we can get started with developing an ASP.NET Core application using F#. This scenario is pretty straightforward, there are no extra hoops to jump over. In this post »

Stubbing service dependencies in .NET using Stubbery

June 12, 2016 · .net .net-core testing integration-testing

Introduction When writing integration tests for a service (especially if we are running a long, end-to-end test), it often causes a problem that the external dependencies of our service fail. Let's say we have a service handling customer payments and »

How to validate action parameters with DataAnnotation attributes?

February 28, 2016 · c# .net-core

Model validation in MVC In both MVC and Web Api we can use the attributes provided in the System.ComponentModel.DataAnnotations namespace to specify validation rules for our models. Let's say we have a controller action with the following signature, »

ASP.NET Core 1.0: hints to get started

February 14, 2016 · c# .net .net-core dnx

I recently started working on implementing a Web Api application using ASP.NET Core 1.0, running it on Linux with the CoreCLR. There have been many changes introduced in this new version of ASP.NET, and there are also »