Learn how to gracefully handle Application Shutdown in ASP.NET Core by looking at the handling of flushing the application insights messages when asp.net core exits
When running an ASP.NET Core web application, there are cases when you need to do some logic when the application stops. An example: you are logging and have to flush the last message to the log (Application Insights). In that case you need can add an event in the
Configure method. In this post I show a short example of how doing this.
Continue reading “Application Shutdown in ASP.NET Core with IApplicationLifetime”
Create a VSTS release pipeline for Azure Functions
Azure Functions enable you to easily run small pieces of code in the cloud. To do this right, you need to setup continuous delivery of the infrastructure and the code involved. Otherwise you will end with an uncontrolled environment where nobody knows what code is actually running. In this blog post I’ll describe how to setup a deployment pipeline for Functions with VSTS. This will enable you to deploy Functions as Infrastructure as Code.
From an deployment perspective an Azure Function contains of two parts:
- Azure infrastructure
- Function code
Both the ARM template and the code can be deployed from VSTS. By doing this, you can manage functions like any other Azure resource.
Continue reading “Use VSTS to deploy Functions as Infrastructure as Code”
.NET Core comes with a new tool chain for software development. These tools run from the CLI (Command Line Interface). Out of the box you have command line restore, build, etc. These tools are the primary tools on which higher-level tools, such as Integrated Development Environments (IDEs), editors and build orchestrators can build on. The tools set in extendable on project level. That means that you can add tools in the context of your project by adding it to your project file. The tool you want to run with the from the CLI is called a verb (dotnet-verb). Running a verb is done by: dotnet verb.
Continue reading “Make a .NET Core CLI Extensions”