Resolving Application Insights performance counters collection issue for .NET applications

If you’re using Application Insights SDK in your .NET applications and you want to gather performance counters like disk, memory or CPU usage, you have two main approaches that you can follow: EventCounters: this is a future-proof, cross-platform alternative to classic performance counters that natively supports collection of system and custom counters both from .NET Framework and .NET (Core) applications. I will share more about EventCounters and how you can use these in a subsequent blog post, therefore EventCounters are out of scope for this blog post. ...

June 6, 2023 · 3 min · Kristina Devochko

Strengthening security posture of containerized .NET applications with .NET Chiseled Containers (updated Dec.2023)

🎄This blog post is also a contribution to .NET Advent Calendar where during December, experts from the tech community share their knowledge about .NET related topics. You’re welcome to check out all the contributions here: .NET Advent Calendar 2022 Introduction In the modern world of cloud native application development more and more organizations are moving away from classic bare metal deployments and are adopting technologies like containerization and orchestration for a more efficient and sustainable way to deploy applications at scale on different types of infrastructure. ...

December 19, 2022 · 15 min · Kristina Devochko

How to override ASP.NET Core application runtime version

With release of .NET and .NET Core one significant change you may have noticed is the new version support lifecycle. .NET Framework LTS (long-time support) versions are normally supported for 5+ years by Microsoft but support lifecycle for .NET and .NET Core LTS versions has decreased to 3 years. The main reasons for the shorter support lifecycle are the overall faster technology evolvement, but also more active framework development which requires frequent releases both from the functional and security perspective. ...

July 23, 2022 · 4 min · Kristina Devochko

Detect and avoid this certificate validation trap in .NET!

There is one scary property in .NET which, if misused or forgotten, can make your security champions tremble at night…🙀🙀🙀 As scary as it sounds, the risk of forgetting or misusing the property is pretty serious and I've seen it multiple times sneaking into the source code as part of the pull request. And I keep seeing it still. Therefore this tech tip gets to see the world.☀️ The property I'm talking about is ServicePointManager.ServerCertificateValidationCallback that is part of a System.Net library. This property can be used for custom certificate validation in case you're using a non-trusted certificate authority. One of the scenarios when you can end up using this property is when you're developing and testing new functionality and you're using a self-signed TLS certificate on the server instead of production-level certificates. If this property is not set and you're using a non-trusted certificate, you may get errors like: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ...

July 18, 2022 · 3 min · Kristina Devochko

Automate .NET target framework update with PowerShell

With all the active development in the .NET world many of us have faced a situation where we need to update .NET target framework more frequently in order to be able to keep up, but at the same time to be able to utilize all the goodies .NET has to offer. It’s not a big deal when you have 1, 2, 10 projects but when you have 300+ projects that need to be updated? Then it can become a pretty boring and time-consuming process. And what’s boring must always be automated, right? 😉 ...

March 28, 2022 · 3 min · Kristina Devochko