We, as C# developers, are used to throwing exceptions everywhere be it a functional such as validation or technical such as network failure. But is it worth throwing exceptions everywhere? Exceptions are expensive. You should not throw exceptions everywhere. You should throw exceptions only when it is necessary. But how? Let’s discuss the alternative approach. Types of exceptions in general Excellent article by Eric Lippert on exceptions, where you can find the types of exceptions in general.

Continue reading

Recently, Polly team did fabulous job 🎉 by releasing the new version 8.0.0. It has lot of improvements and also they re-implemented Policy as Strategy. Polly v8 introduces the concept of resilience pipelines, a powerful tool that put together one or more resilience strategies.Here is the all changes you can find. The Problem Microsoft provides a extension Microsoft.Extensions.Http.Polly which allows us to use Polly with HttpClientFactory. It is very easy to use and you can find the documentation here.

Continue reading

In today’s world, we are using a lot of APIs to build our applications. To make your .NET based applications more ressilient and fault tolerant, go to solution is to use Polly. Probably, you are already using it. So,I’m not going to explain how to use it in general. You can find some excellent documentation here. However, In this post I’m going to discuss about one of the typical scenario where we need to refresh the authentication token when using Polly.

Continue reading

Recently, I was working on a project where we had to download multiple large files from Azure Blob Storage and process it further. When the application hits the production environment and started getting the actual files, we observed that memory consumption is getting very high. On top of that, the application was hosted in shared windows based app service plan, which was making it even worse for other applications too.

Continue reading

Hi Everyone! This post is continuation of how to perform unit and integration tests for Azure Blob Storage using Azurite Test Containers, Moq and xUnit. Over the time, I will updated this page with links to individual posts : Getting started with testing for Azure Blob Storage : Dependency Injection Getting started with testing for Azure Blob Storage : Unit Test with help of Moq Getting started with testing for Azure Blob Storage : Unit Test with help of FakeItEasy (Alternative to MoQ)

Continue reading

Hi Everyone! This post is continuation of how to perform unit and integration tests for Azure Blob Storage using Azurite Test Containers, Moq and xUnit. Over the time, I will updated this page with links to individual posts : Getting started with testing for Azure Blob Storage : Dependency Injection Getting started with testing for Azure Blob Storage : Unit Test with help of Moq Getting started with testing for Azure Blob Storage : Unit Test with help of FakeItEasy (Alternative to MoQ)

Continue reading

Hi Everyone! This post is continuation of how to perform unit and integration tests for Azure Blob Storage using Azurite Test Containers, Moq and xUnit. Over the time, I will updated this page with links to individual posts : Getting started with testing for Azure Blob Storage : Dependency Injection This Post - Getting started with testing for Azure Blob Storage : Unit Test with help of Moq Getting started with testing for Azure Blob Storage : Unit Test with help of FakeItEasy (Alternative to MoQ)

Continue reading

Author's picture

Ankit Sarkar | .NET Enthusiast | Azure Cloud Practitioner

Technical Architect, Microsoft Certified Azure Solutions Architect Expert

Technical Architect

Leeds
#TalkWithMe