Building .NET Core console applications with IHost and HostBuild to take advantage of IHostedService, graceful shutdown, dependency injection, logging, hostbuilder, configuration and more.
When building services for data processing you do not always need a user interface. An IHost is very capable of hosting such an application in a console application as headless service. The IHost does give you a number of advantages like graceful shut down, dependency injection, logging, and configuration. When running long processing tasks in Docker containers, graceful shut down helps you to keep the state of your application consistent. This post explains how making use of the generic IHost in .NET Core for headless services.
Continue reading “Hosting services in .NET Core console application”
Get your devops going by integrating your application into your team communication tooling.
To get more out of Slack and your team, you can integrate Slack with your application. Integrating with slack is done with webhooks. In this sample I use a Incoming Webhook to post the messages from the application to slack. By adding a GlobalExceptionFilter to you .Net Core web application, you can get all exceptions that are not handled in your web application.
Continue reading “Get your web application errors into Slack”