How To Fix

120 posts

How to fix the “Handler “dotless” has a bad module “ManagedPipelineHandler” in its module list” problem

The Problem You are working away, using the wonderful dotless plugin for IIS, and also taking advantage of the great features of the Less Css System.  Then, for no good reason, your .less file stops loading.  You create all sorts of new Mime types and reboot the server, but nothing seems to work, how do […]

How to fix Visual Studio slowness problems by deleting ExpansionsXML.xml

The Problem I’ve had Visual Studio 2010 installed from the first day it was released, and lately it has gotten significantly slower.   That’s not surprising with an increased number of add-ons and extensions.  However, closing the program recently started taking an increasingly long period of time.  It recently reached OVER EIGHT MINUTES so I […]

Which jQuery cropping plugin should you use?

I recently had the need to do some automated image cropping.  I was already using the wonderful ImageResizing.Net plugin, which made all of the server code very easy.  It came with some sample code that uses the JCrop plugin (by Deep Liquid). Jcrop does it’s job very well.  However… In the modern web development environment, […]

How to fix “The system cannot find the path specified” error in asp.net mvc 4

The Problem: So, you’re coding away, and you run your asp.net mvc 4 site and you get the following error: The system cannot find the path specified The Cause: Most likely you have not already specified the database in the web.config, it’s a simple fix. The Solution: Just add this code into the web.config <add […]

How to create a Cron job with MySqlDump, and use GZip Compression

Full Disclosure: I am a long-term Microsoft Windows user and developer and I haven’t used any sort of Cron job in about 12 years, so all this was new to me. What is a Cron job? It’s just something that runs chronically, i.e. an automated procedure on the server that runs every day or hour. […]

How to fix problems running Windows Azure web applications locally

The Problem: You have an asp.net mvc 3 web project, and you are running it as part of a windows azure web application.   In my case it worked initially, but after I installed some Visual Studio plugins, run Windows Update, and installed a new router, it mysteriously stopped working.  A few of the error […]

How to programatically set the sql server database used by entity framework

The Problem: For one reason or another you need to set the database used by entity framework programatically.  The more common way of doing such a thing is to set the database in your web.config class, but for whatever reason you need to set it in actual C# code. The Cause: There is no cause […]

How to make a random name generator in C#

I recnetly came up with a simple random name generator to do an initial seed of a database for testing using real names,a nd I thought I would share. Here is my NameGenerator.cs file. It’s fairly simple, it just picks a name at random out of the top 100 first names and the top 100 […]

How to use UI Hints and Display Templates in ASP.net MVC 3

Surprisingly there is very little information about UI Hints and Display templates for ASP.net MVC 3, so I thought I would share what I have learned. What are Display Templates? Display Templates are lovely features of ASP.net MVC 3 that allow you to have a common formatting for certain properties of your objects.  For example, […]

How to fix the Initialization method TestInitialize threw exception problem in In Visual Studio 2010 Unit Testing

The Problem You are making an ASP.net MVC 3 web application, and being a good person, you are unit testing as much as possible.  You have properly separated your database from your business objects and every other good practice.  However, when you unit test your controllers, you throw in a fake DBContext (I am assuming […]