Just added two interviews to the main site
Here are my interviews with Business Radio X. Enjoy!
How to fix the infamous “Unable to cast object of type ‘System.Int32’ to type ‘System.String’ error in asp.net mvc
The Problem You have created a lovely model in asp.net mvc 4, using Entity Framework and a whole host of attributes. One of the properties of your model looks like this [Required] [Display(Name = “Expiration Month (MM)”)] [StringLength(2,ErrorMessage = “You must enter two digits”, MinimumLength = 1)] [Range(1,12, ErrorMessage = “You must enter a valid […]
How to fix problems with data cacheing in ASP.net MVC 4, SignalR and Entity Framework
The Problem I was using the wonderful SignalR libraries to create a status window (I have a VERY long running process in my new Data Hammer project, it takes about 15 minutes to run) and I need to inform the user on where the process is at any given time. My original code looked like […]
The free version of Google Apps is going away, but have no fear
A few weeks ago Google decided to end their free version of GMail, or as they referred to it, Google Apps for domains. If you are an existing customer you were grandfathered in, but otherwise you will now have to pay to use their email service (and spam filtering) with your own domain name. Happily […]
How to configure wildcard routing in asp.net mvc 4
The Problem You are trying to configure Widlcard routing (i.e. something like https://domain.com/SomeUserName/) and find it problematic. The Cause That is largely by design – wildcard routing is resource intensive and rarely needed. The Solution If you want to do it anyway, use the following routes routes.MapRoute(“Default”, “”, new { controller = “Home”, action = […]
How to fix problems with entity framework decimal precision
The Problem You are attempting to change a database column of type decimal from a precision of two decimal place to one decimal place via data annotations, and there does not seem to be a good way to do it. The Cause There isn’t a good way to do it. The Solution However, there is […]
How to order a custom WordPress Post Type by a custom numeric field
So, you need to order a custom WordPress Post Type by a custom numeric field – how? The Problem You have a WordPress custom post types, and you need to order by a custom numeric field – how do you do that? The Cause You would think that it would be relatively simple, for example the below […]
How to fix problems with asp.net mvc 4 javascript bundling
The Problem You are using the new JavaScript bundling and minification features in asp.net mvc 4, and some of your JavaScript files are not being included The Cause The minification process – in it’s strange wisdom, does not include .min files when it bundles. Therefore something like .Include(“~/Scripts/jHtmlArea-0.7.0.min.js”) will not be included, leading to JavaScript errors. The Solution Just use the […]
How to hire a web company – Who am I?
As part of my upcoming book, How to hire a web company. Who am I? I’m Steve French – I started Digital Tool Factory in 2002, and recently celebrated ten full years as an independent business. Prior to that I worked at a .com startup that went nowhere, and then for an advertising agency. That […]
How to fix problems with WordPress taxonomy permalinks
The Problem You are attempting to use WordPress taxonomies to create custom permalinks, and all you get are 404 errors. To clarify, I was trying to use the taxonomies purely to maniplate custom page types and their permalinks, to create something like https://Domain.com/SummerCrops/Tomatos where SummerCrops is my custom taxonomy, and Tomatos is a page name […]