How to unit test async controllers in ASP.NET 5

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 This post is about various methods which helps to write unit tests. XUnit is used as unit framework. Here is the async controller code. public...


Getting started with ASP.NET 5 configuration

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 ASP.NET. The new configuration model...


Excecute SSIS package (DTSX) from C#

SQL Server Integration Services (SSIS) is a component of the Microsoft SQL Server database software that can be used to perform a broad range of data migration tasks. SSIS is a platform for data integration and workflow applications. You can execute SSIS package from C# using following snippet. var application...


Working with SASS in ASP.NET

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 to compile those files at...


Setting up SonarQube with SQL Server on Windows

By default SonarQube comes with an embedded database, which is not recommended for production use and which cannot be scaled. This post is about configuring SonaqQube to use SQL Server instead of default database. As the first step you need to configure SQL Server. Using SQL Server configuration manager, make...


Error message when you open SQL Server Configuration Manager in SQL Server: "Cannot connect to WMI provider. You do not have permission or the server is unreachable"

Today while working on SQL Server configuration I faced this strange error. I was running as administrator and I know SQL Server was running. Later I found a Microsoft KB article related to this issue. This issue is because “On a 64-bit computer, you install an instance of the 32-bit...


Bundling and minification in ASP.NET 5 using Gulp and Bower

This post is about Bundling and minification in ASP.NET 5. ASP.NET MVC 5 comes with bundling and minification support. Long back I wrote a blog post on CSS and JavaScript Bundling and Minification in ASP.NET. This is post is using Gulp and Bower. Gulp is a streaming build system, by...