Basic authentication middleware for ASP.NET 5

Standard

This post is about building another middleware component for ASP.NET 5. Long back I wrote a post about Basic authentication for Web API. This implementation uses the same functionality. It checks for Authorization header in the HTTP Request, if not found it set the Response read more →

Build your own middleware – HTML Minification middleware

Standard

Minification refers to the process of removing unnecessary or redundant data without affecting how the resource is processed by the browser – e.g. code comments and formatting, removing unused code, using shorter variable and function names, and so on. If you are using wordpress, you read more →

How to unit test async controllers in ASP.NET 5

Standard

In .NET 4.5 Microsoft introduced Async methods, which helps developers write asynchronous code similar to normal code. Instead of returning ActionResult async method returns Task<ActionResult> This post is about various methods which helps to write unit tests. XUnit is used as unit framework. Here is read more →

Getting started with ASP.NET 5 configuration

Standard

When ASP.NET introduced, unlike conventional web.config, it was project.json. When I started exploring ASP.NET code, I couldn’t find the System.Configuration namespace as well. This post is about reading configuration in ASP.NET from project.json file. ASP.NET 5’s configuration system has been re-architected from previous versions of read more →

Working with SASS in ASP.NET

Standard

Recently someone introduced me SASS (Syntactically Awesome Style Sheets). This post is about using SASS in ASP.NET MVC with Visual Studio and using Visual Studio code. When you’re using a CSS pre-processor (SASS is a CSS pre-processor like LESS) to write your stylesheets, you need read more →