Just a brief heads up if you are working with .NET components in ColdFusion. I've recently ported some CF code to a new server and suddenly saw this cryptic error: "System.Runtime.InteropServices.ExternalException".

It appeared that the line of code that was causing the error was

view plain
1<cfset img.Save("#newimg#")>
in which img is an instance of a .NET Bitmap object. I persevered and managed to get some clues from various .NET posts, some of which pointed at file system problems. I was able to determine that I was trying to write to a non-existent directory when calling the img.Save method. I fixed the directory path and pointed it to a valid location and it solved my issue.

An easy fix in the end but potentially hard to track down. And before you say anything, yes I should have wrapped all of this in a DirectoryExists() method in the first place :-)