Kagunda JM

/ Software Developer /

Installing Jekyll on windows 8.1

Jekyll is an static site generator designed for static websites and blogs. In this post, I enumerate the process of installing Jekyll on Windows 8.1. On previous ocassions, my posts (though rare) have been dynamic and created using blogging platforms which make writing blog posts a very easy process. Unfortunately I never kept pace with the updates on these platforms and one day I woke up to find my site had been hacked.

Returning Byte Array Data in ASP.NET MVC

Assume you have the following ASP.NET MVC model which contains a byte array property which will be used to hold data for an image. public class CompanyModel { public string Id { get; set; } public string Name { get; set; } public byte[] Logo { get; set; } } On the controller side, you fetch the data from the database using code similar to the following public ActionResult Settings(string countyId) { var county = _session.

Cannot attach database SQL Server 2012 error 5

When upgrading from MS SQL Server 2008 to MS SQL Server 2012, I decided to retain the data directories I was using in SQL 2008. I therefore did a backup and detached all my private databases, removed SQL 2008 and did a clean install of MS SQL 2012. I logged into the new server and on trying to attach back any of my databases, I encountered the following error: CREATE FILE encountered operating system error 5 (Access is denied) while attempting to open or create the physical file .

Add NUnit ASP.NET MVC Test Framework in VS 2012

Instructions for adding NUnit Test Framework to Visual Studio 2010 are lengthy and complicated. In a previous installation of Visual Studio 2010 I remember having used an extension that made the task much easier but I never noted down the name or url the extension. I have finally managed to get hold of the name and links of the extension. And so, lest I forget, I am noting it down. I never know when I might require it again.

Invalid Character Value for Cast Specification

Sometimes we waste a lot of time trying to get to the root cause of exceptions. Some exceptions are so misleading that they end up sending you on a wild goose chase. When I encountered the following exception during SQL Server data importation process, Invalid character value for cast specification. The wording led me to believe that one of the characters had a casting problem. Going through the code, I could not locate any place where I was casting single characters.