MonoDevelop 4: CSS files not loading for an ASP.NET MVC4 site

Posted on 3 Comments
MonoDevelop 4
MonoDevelop 4

If you are like me — always living in Linux, but sometimes being required to develop ASP.NET sites — you have no doubt used MonoDevelop. While its latest iteration brings in many good things, it’s still not the ready-to-use Visual Studio.

Once you are past the System.UnauthorizedAccessException and Could not load file or assembly ‘System.Web.WebPages’ errors, you might encounter another weirdo in an imported MVC4 site, an error that prevents loading of default stylesheet(s) in browser. As a result, your site may look completely deprived of any styles, colors, images, etc.

The origin of this error lies in the simple fact that while Windows (possibly the source of your imported MVC site) is case-insensitive with file names, Linux isn’t. Correcting this is as simple as:

  1. opening the file App_Start > BundleConfig.cs, and
  2. changing
  3. bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));


    bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/Site.css"));

  4. that is: site.css to Site.css

Merry coding!

The Making-of an Android App

Posted on 4 Comments

I have been developing mobile web apps since quite some time now, mostly using popular JavaScript frameworks, like Sencha Touch, which give a native look & feel to the app. Web apps have their merits, but using a platform’s SDK in order to develop a true native app is is inevitable in cases where you exclusively want your app to be available offline and also leverage some OS niceties that are unavailable to plain JS apps.

I recently got into developing a small, simple, but useful app for Android using using their latest API (level 16). The app — UnJumble — takes as input a jumbled English word, searches through a database of 58,000+ words for possible matches, and displays unscrambled word suggestions based on matches. As an added bonus, UnJumble fetches meanings for each unjumbled suggestion from Wordnik. Of course, the user gets to enable or disable the fetching of meanings as querying Wordnik requires an Internet connection, and this process may be a bit slow in some cases.

I’m currently in the process of giving finishing touches to UnJumble to prepare it for publishing on Google Play store. UnJumble is now available on Google Play. Throughout the journey of its development, I learned a lot of cool things about developing Android apps. In this article, I’ll share what all I learned by methodically teaching you how to build your own Android app using the several “components” I used to create UnJumble. But I’ll assume you’ve read at least a couple of tutorials on the Android Developers website, and that you are fairly familiar with a handful of Android SDK’s major terms and components.

Get ready to read about the journey of an Android app from its development to publishing.

Complete source code for UnJumble can be found at its github page.

Continue reading The Making-of an Android App

Hosting meteor.js app in IIS

Posted on 10 Comments

meteorjsMaking reactive and real-time web applications is in fashion these days. Among popular real-time programming frameworks are meteor.js, knockout.js and signalr. Both Knockout and SignalR are developed by Microsoft employees, and integrate seamlessly with Microsoft products. Meteor, on the other hand, is though based on the cross-platform node.js, it is more Linux / Mac-centric than it is Windows. In fact, Meteor’s official documentation is also designed with instructions that pertain to Linux. They don’t even have an official Windows installer for their framework, but depend on a certain Tom Wijsman for that.

It’s true that Linux/Apache is still the dominant server stack, but we still have thousands of corporations that rely on Microsoft’s Windows servers and IIS. And deploying a meteor app on a Windows server is a real pain in the butt because the ever so elegant command meteor bundle doesn’t work in Windows. Last I heard from Tom, implementation of meteor bundle in Windows was in the works. But meteor-win won’t support it until at least v0.5.1.

Although there are workarounds like using a Vagrant VM or msysgit for deploying meteor apps on Windows servers, as I found out through my forum thread, all these workarounds are either too cumbersome or don’t work in all cases. During my constant searching on ways to deploy my meteor app on Windows, I stumbled upon an excellent utility called iisnode, which does that in the best and most elegant way possible.

iisnode is basically meant to host node.js applications is IIS, but again as meteor apps themselves are node.js apps only, using iisnode to host them just works. But some setup and configuration is required before your app is fully hosted.

Continue reading Hosting meteor.js app in IIS

Fixing the partition table: Mis-sized extended partition

Posted on Leave a comment

This article requires the reader to have at least some basic understanding of harddisk partitions and MBR.

If you are one of the rare unfortunate blokes who have got their partition table screwed up due to a mis-sized extended partition, fret not, for there’s a very simple-to-use tool that can fix things for you. I discovered FixParts when I realized I was one of those unfortunate blokes with a messed up partition table when I was trying to install Mint 13 on my laptop. Of course, things do not go wrong without a reason. A few months back, to install Ubuntu 11.10 “Oneiric”, I did some shrinking and expanding of partitions using GParted, which must have screwed up my extended partition, making its end sector greater than the total sectors on my harddisk!

Although not a harmful scenario (damn, I didn’t even discover it until after 7 whole months!), it makes the partition table look fine and as expected in some partition managers but botched in others. As was in my case, Mint 13’s installer wasn’t able to see any partition on my disk and showed the disk as being completely blank.

A simple run of fixparts and saving the partition table to MBR fixed things for me. Silent and fast! So in case you’ve got your harddisk’s partition table not-so-heavily goofed up, FixParts is highly recommended. In case it is a more unfortunate case, TestDisk might save your day.

TweetDeck — Installing in Ubuntu 64-bit

Posted on 3 Comments

With Adobe AIR‘s (the runtime required by TweetDeck) official support for Linux ended, and no Linux 64-bit edition already in place, installing TweetDeck it in Ubuntu 64-bit is one hell of a task. You can get it installed in your 64-bit Linux system by following one of these tutorials, but chances are you’ll end up with a partially working installation, as happened with me.

Here I list out 4 simple steps to get the thing properly installed & working in Ubuntu:

  1. Download the 64-bit Adobe AIR deb package.
  2. Install the deb using the command: sudo dpkg -i adobeair_64.deb
  3. (Important) Install ia32-libs: sudo apt-get install ia32-libs. This is required for 32-bit environment emulation. Remember, the above packaged “64-bit” AIR is still 32-bit Linux version only. If you do not install ia32-libs, you may get errors like – Error loading the runtime ( wrong ELF class: ELFCLASS64)
  4. Download the latest TweetDeck AIR package. Install the package by double-clicking on it. Alternately, fire the command “Adobe AIR Application Installer” (with quotes) to invoke the GUI app installer, from where you can browse to the location of the downloaded TweetDeck AIR package to install it.

Tested on Kubuntu 11.10 (64-bit)