Showing posts from August, 2009

Installing Elmah 1.1 with nopCommerce

In my spare time I’ve been working on an ASP.NET 3.5 web forms ecommerce application. In order to protect the privacy of said web site’s owner I won’t go into too many details about the application itself, except to say that it is built on top of the awesome and open source nopCommerce ecommerce solution. If you’ve never used it you should definitely check it out – it has many excellent features including language and currency localization, shipping providers, payment gateway support, tax support etc. etc. etc. The only real caveat is that the application contains a copyright notice “Powered by nopCommerce” that can be removed for a one time fee of $50.00 USD. This is a pretty cost effective solution regardless of whether or not you remove the notice…The site is almost ready to go out the door – but before putting it online I wanted to add more robust error handling than nopCommerce provides out of the box. nopCommerce does provide some basic error logging in the administrative area o…

WPF - Custom Control VS User Control

In WPF what is the difference between a Custom Control and a User Control? This is pretty basic stuff but I hear this question being asked a LOT so figured I’d do a quick post on the subject.A user control is essentially the composition of various controls into one larger control allowing a whole group of controls to be reused. It is extremely similar to creating a Window/Page in WPF – you have access both to the XAML markup and the code-behind and can employ the same techniques (drag/drop, declaratively through XAML) when adding child controls.If you have an ASP.NET background this will seem extremely similar to an ASCX control – which it is. Both are used to partition common user interface components and allow them to be reused as a single unit in the future. As an example, take the following address input mockup. The user may be asked to enter their address when registering an account with the application/choosing a delivery address for a product/choosing a billing address for a pr…

.NET Runtime version 2.0.50727.3082 - Fatal Execution Engine Error (7A2E1132) **Updated**

I’m working on a WPF project right now and Visual Studio has been crashing more often than I would like. The event viewer shows a .NET Runtime Error with the following message:.NET Runtime version 2.0.50727.3082 - Fatal Execution Engine Error (7A2E1132)I am running Visual Studio 2008 SP1 and it has been pretty solid for the last couple of months – up until last week. The only new piece of software I’ve installed is Gallio ( and the timeframes for the installation and the occurrence of this issue are suspiciously close. I searched the mb-unit issue log on google code ( and found a similar closed issue (albeit it was logged under ResharperRunner which I am not using).The issue was closed as not reproducible but the body of the bug report was very similar to my own experience:What steps will reproduce the problem?1. Open a WPF Window (XAML file) in Designer and/or XAML mode2. VS crashes without a message. In Application eventlog you …

Gallio – Visual Studio Integration – Issue with output of data-driven tests

I recently came across the Gallio platform, a “common object model, runtime services and tools (such as test runners) that may be leveraged by any number of test frameworks”. Essentially Gallio acts as a one stop shop for test integration and the “killer feature” for me is it’s integration into the Visual Studio test view. For those of us that do not have access to Resharper or Testdriven.NET (and have no way of running anything but MSTest tests directly through Visual Studio), Gallio’s offering is very appealing. It allows the user to run any test type supported by the Gallio platform (MbUnit, NUnit, xUnit, etc.) through Visual Studio as if they were MSTest unit tests – brilliant. For instance, the following screenshot shows a few simple MbUnit tests in Visual Studio, as well as the test run results in the Test Results window…An unfortunate limitation of the mismatch between MSTest’s restricted feature set and MbUnit’s far more expressive set is that some more advanced features are l…

The value '' of the MaximumValue property of 'RangeValidator1' cannot be converted to type 'Date'.

I ran into a stupid problem tonight when working on an ASP.NET site and I thought i’d share the very obvious answer I ran into…Essentially, I was adding a textbox with an ajax control toolkit calendar extender to my form. I needed to ensure that a date, prior to today’s date, could not be selected – a pattern pretty common in web apps. To do so I added a range validator to the form and added a minimum value of today’s date to the page load event in the codebehind. <asp:TextBoxrunat="server"ID="txtDate"/>
AlternateText="Click to show calendar"/>


Google Chrome – Bookmark Sync…to Google Documents?!?!

By now most of you probably know that the latest dev channel build of Google Chrome (link) enables bookmark syncing – for me an absolute must-have feature that I’ve been dying to get my hands on…all you have to do is download from the dev channel or use the channel changer and then start chrome up with the --enable-sync command-line flag. It works pretty well (shortly after installing it on my home box i reimaged my pc and lo-and-behold, there were my bookmarks waiting for me when I installed Chrome). However, one thing really does not sit right with me: bookmarks are synced with Google Documents and not Google Bookmarks…does this seem counter-intuitive to anyone else?…kind of like saving my bookmarks as flat files in the My Documents folder in Windows…The reason, I believe, is pretty straightforward, though you may correct me if I am mistaken. Google Documents uses XMPP (Extensible Messaging and Presence Protocol) to essentially push messages in real time rather than having a client …

Throw vs Throw ex

This tidbit should be commonly known but in my experience is often overlooked and therefore worth a blog post. In short, there is a big difference between using Throw and Throw ex to re-throw an exception in .NET. Essentially, when using the Throw ex syntax parameters including the stack trace itself are reset resulting in unreliable stack traces when exceptions are bubbled up through an application. To provide a brief example take a look at the following code. I have created a console application with three classes:We have Program – the entry point to the console application. The main procedure creates an instance of a DogWalkerClass and runs the WalkDogWithThrowEx or WalkDogWithThrow procedure depending on the value of the throwWithEx field. Both of these procedures in turn create an instance of the BadDog class and calls the WalkDog procedure. The WalkDog procedure has one-and-only-one purpose – to throw an exception.Program.cs 1: using System;
2: using System.Collections.Generic…

Windows 7 (Build 7100) – Program Icons Disappeared

I recently ran into an odd bug with Windows 7. I am running build 7100 and don’t yet know if this pertains to the recent RTM release. After running the Beta (which was extremely stable) for a few months, I woke up one morning to find that my Program icons had disappeared. Clicking on Start->All Programs resulted in the following:As you’ll notice from all the icons in the background – I haven’t been keeping my desktop (or PC in general) too tidy. Knowing that I was running in a beta led to the thinking that i’ll reimage it soon, so can trash it now. As it happens, this general untidiness led to the disappearing icons.The following link suggested that Windows 7 (at least the 7100 build) could only handle approximately 70 shortcuts in the Program menu. Apparently I had recently installed a few more applications that sent me over the top. The solution was to delete a few items from my programs directory. This was achieved by:1. Clicking Start2. Right Clicking on All Programs3. Left-cli…

Syncfusion – Essential Studio ASP.NET MVC Edition - $5

On Monday August 10th Syncfusion will offer their Essential Studio ASP.NET MVC edition for $5. The limit is 5 licenses per company and the s/w is licensed per developer with 30 days of subscription coverage. Given that the software is normally $995 this is a steal. Click here for more info. Proceeds go to One Laptop Per Child.

Coderush vs Resharper