Blog

Blog posts on .NET, Azure, and more.

Importance of Cancellation tokens in ASP.NET Core and EF Core

February 20, 2024 by Anuraj

AspNetCore EFCore SqlServer

In this blog post, we’ll explore into why cancellation tokens are indispensable in the context of ASP.NET Core and EF Core, and how they contribute to the overall performance and user experience of our applications.

Building Reliable ASP.NET Core Applications: Handling SQL Server Connection Retries

January 31, 2024 by Anuraj

AspNetCore SqlServer

In this blog post, we’ll explore the intricacies of ASP.NET Core EF Core and delve into effective strategies for handling connection retries when dealing with SQL Server databases. By implementing retry mechanisms, we can enhance the robustness of our applications and ensure seamless interactions with SQL Server databases.

ASP.NET Core Logging with Serilog and SQL Server

January 01, 2024 by Anuraj

AspNetCore Logging Serilog

Serilog stands out as an excellent third-party library for implementing structured logging in ASP.NET Core applications. The adoption of structured logging is crucial for generating logs that are both easily readable and filterable. Opting for SQL Server as a log destination provides the advantage of harnessing SQL querying capabilities for efficient log filtering. This becomes particularly beneficial when our application is already integrated with SQL Server.

How to use identity to secure a Web API backend for single page apps

December 19, 2023 by Anuraj

AspNetCore Security Identity

This post is about how to use Identity to secure a Web API backend for SPAs such as Angular, React, and Vue apps. Unlike ASP.NET Core MVC, Web API projects doesn’t support the --auth Individual option while creating the Web API project from dotnet SDK. We have to manually add the nuget package references. So first we need to create a web api project, we can do that using the following command - ` dotnet new webapi –name Weatherforecast.Api –output Weatherforecast`. Next we need to add reference of different NuGet packages. I am using Sql Server as the backend.

Getting started with .NET Aspire

December 17, 2023 by Anuraj

Azure Cloudnative

This post is about installing dotnet aspire. The .NET Aspire is an opinionated, cloud ready stack for building observable, production ready, distributed apps. .NET Aspire is delivered through a collection of NuGet packages that handle specific cloud-native concerns. Cloud-native apps often consist of small, interconnected pieces or microservices rather than a single, monolithic code base. Cloud-native apps generally consume a large number of services, such as databases, messaging, and caching.

Copyright © 2024 Anuraj. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Powered by Jekyll. Hosted with ❤ by GitHub