OOP with WCF: Decorate DataContract with [KnownType(typeof(aType))]

WCF makes heavy use of reflection.  In order to support object inheritance one needs to help WCF by decorating DataContract with [KnownType(typeof(aType))] so the service reference will include the proper information.  Below is a quick example: The below data contract for an Animal also includes the known types of Cat and Dog: [DataContract] [KnownType(typeof(Cat))] [KnownType(typeof(Dog))] […]

Just do it…

“Do what you should do, when you should do it, whether you feel like it or not.”   Thomas Huxley

Busy or productive…

Being busy does not always mean real work. The object of all work is production or accomplishment and to either of these ends there must be forethought, system, planning, intelligence, and honest purpose, as well as perspiration. Seeming to do is not doing.  Thomas A. Edison

SecurityException / IIS .Net Trust Levels / Diagnostic Traces

This dasBlog website is now being hosted at WinHost.  In reality, the migration was trivial.  Using IIS Manager, there is an option under Deploy to “Export Application…”which saves the entire site to a .zip file.  And then after connecting to the new site, one simply runs “Import Application…” and points to the saved .zip file—simple […]

The TAO of Programming

From the book by Geoffrey James Thus spake the Master Programmer: “A well-written program is its own heaven; a poorly-written program is its own hell.”

Microsoft’s support site solved WP7 error 801812DD

While I find it amazing that the USB cable needs to be directly connected to the port on the back of the computer to upgrade to the March 2011 release of the Windows Phone 7 operating system, at least the support page from Microsoft provided useful information: Now I can happily search the app store, […]

Extension methods in C#

Wikipedia has a very good overview of extension methods in C# here. Basically, if you create a static method in a static class and the first parameter includes the keyword ‘this’ then the first parameter will be the calling object and you’ve created an extension method. Here is a quick example console application (based on […]

Uppercase vs. UpperCase

XamlParseException occurred: The property ‘VerticalGridlinesBrush’ was not found in type ‘System.Windows.Controls.DataGrid’. [Line: 19 Position: 30] Took me 30 minutes to see that <Setter Property="VerticalGridlinesBrush">     <Setter.Value>         <SolidColorBrush Color="#FFACACAC"/>     </Setter.Value> </Setter> should be <Setter Property="VerticalGridLinesBrush">     <Setter.Value>         <SolidColorBrush Color="#FFACACAC"/>     </Setter.Value> </Setter> Next time I need to hit ctrl+space sooner…