Upload files to the server using Javascript and MVC WebAPI

The ASP.NET WebAPI is really versatile and powerful and I like to use it as much as I can when I develop for the web. I know that MVC controller methods can also process ajax requests, but I like the separation of concerns. WebAPI for REST calls and MVC…

How to bind an Enum to a DropDownList in ASP.NET MVC

Before ASP.NET MVC 5, the only way to bind an enum to a drop down list in an MVC view you had to roll out your own code. And this was fine. These days, with MVC 5 at your disposal, you can achieve this easily by calling the "oh…

How to Implement Cross Domain Requests (CORS) in WebAPI, old school

WebAPI is awesome. It allows .NET developers to quickly set up a public API for any data with minimal effort. WebAPI has been available for a while and with each iteration, it grows stronger and more versatile. However, there is no point in offering an API that no one can…

An introduction to JavaScript Unit Testing with qUnit and Sinon.js

If you are developing for the web – apps or websites, then it is almost impossible to escape JavaScript. At some point, you will write some client-side code and as the application grows and the requirements become more complex, your JavaScript code is bound to grow with it. Like with every…

Getting Started with RabbitMQ on Windows

RabbitMQ is a great queuing tool that can run on a variety of platforms. If you are planning on doing any distributed, asynchronous processing and you need a system to queue and process items in the background, then you should seriously consider RabbitMQ. The online documentation is great and there…

An introduction to the Common Logging API for .NET

Most developers know that logging is an invaluable tool especially when trying to troubleshoot issues with code running on production. In .Net, there is a plethora of tools to choose from such as Log4Net, nLog, Elmah etc. Each tool has its pros and cons so the decision on which one…