Blog
Blog posts on .NET, Azure, and more.
Implementing Basic Authentication in ASP.NET Core Minimal API
February 13, 2022 by Anuraj
AspNetCore C# MinimalApi
This post is about how implement basic authentication in ASP.NET Core Minimal API. Few days back I got a question / comment in the blog post about Minimal APIs - about implementing Basic authentication in Minimal APIs. Since the Action Filters support is not available in Minimal API I had to find some alternative approach for the implementation. I already wrote two blog posts Basic authentication middleware for ASP.NET 5 and Basic HTTP authentication in ASP.Net Web API on implementing Basic authentication. In this post I am implementing an AuthenticationHandler and using this for implementing basic authentication. As I already explained enough about the concepts, I am not discussing them again in this post.
Angular Server Side Rendering on Azure Static Web Apps
February 13, 2022 by Anuraj
Azure Angular Static Web Apps
This post is about how implement Angular Server side rendering apps on Azure Static Web Apps. What is server-side rendering - A normal Angular application executes within the browser, rendering pages within the DOM in response to user actions. Angular Universal executes on the server, generating static application pages that later get bootstrapped on the consumer. This implies that the appliance usually renders additional quickly, giving users an opportunity to look at the appliance layout before it becomes totally interactive.
Azure Functions consumption plan naming
January 23, 2022 by Anuraj
Azure Serverless
This post is about how to follow naming conventions for Azure Function consumption plans. Unlike Azure App Services, when we create Azure Functions with consumption plan Azure will create a plan name which you can’t modify. If you’re following certain naming conventions it will be different from what you’re following. Here is an example.
Migrating from ASP.NET Core 5.0 MVC app to 6.0
December 14, 2021 by Anuraj
AspNetCore DotNet6
This post is about how to update an existing ASP.NET Core 5.0 MVC project to ASP.NET Core 6.0. I am sharing my experience while upgrading one of .NET 5.0 project to the .NET 6.0. First we need to upgrade TargetFramework element in the csproj file from net5.0 to net6.0. We can enable other .NET 6.0 framework features as well, like Nullable and ImplicitUsings.
Integration Testing ASP.NET Core 6 Minimal APIs
December 11, 2021 by Anuraj
AspNetCore DotNetCore Testing
This post is about implementing integration testing in ASP.NET Core Minimal APIs. Usually when I talk about Minimal APIs, one of the question I used to get is how to implement integration testing and I saw some questions related to this in Stack Overflow as well. In this blog post I am trying to cover implementing ASP.NET Core integration testing with NUnit Framework. This code is can be used in XUnit as well.
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