October 2010 Blog Posts

Where is the WCF Test Client?

I can never remember where this thing is located, so here is my reminder: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\WcfTestClient.exe If you’re writing test harnesses for your services by hand, you’re wasting your time.  Check this guy out (now that you can find it )

posted @ Tuesday, October 26, 2010 2:45 PM | Feedback (0)

ASP.NET MVC File Upload Null

I was trying to throw together a quick and dirty page in my ASP.NET MVC app where we upload a spreadsheet (.xlsx file).  The controller code looked like this: [HttpPost] public ActionResult Upload(HttpPostedFileBase spreadsheetFile) { using (SpreadsheetDocument spreadsheet = SpreadsheetDocument.Open(spreadsheetFile.InputStream, false)) { // do work ...

posted @ Monday, October 18, 2010 10:35 PM | Feedback (2)

Reflector

Not to be confused with .NET Reflector, this is another class I use all the time for doing pseudo-strongly-typed reflection of property names.  Putting it up here for easy reference later: public static class Reflector { public static string GetPropertyName<TProperty>(Expression<Func<TProperty>> property) { LambdaExpression lambda = property; MemberExpression memberExpression; ...

posted @ Monday, October 18, 2010 10:34 AM | Feedback (0)

Check

Years and years ago I wrote a little utility class called Check.cs.  I don’t remember the inspiration exactly, but I think I’ve used it verbatim in nearly every piece of software I’ve developed since.  It’s one of those things that’s best suited for copy/paste reuse vs. a lib reference. Maybe someone else out there might find it useful, but the very least I want to be able to find this easily for quick copy/pasting in the future… public class Check { public static T...

posted @ Thursday, October 14, 2010 12:57 PM | Feedback (0)

Can’t view PDF’s in Chrome 6

So I was setting up a new machine and installed Google Chrome v6.  I quickly realized I couldn’t view PDF’s though I have all of the necessary plugins installed.  I’m not sure why, but by default the Chrome PDF View is disabled by default. Navigate to:  chrome://plugins and you’ll see this: Click Enable and you’ll be good to go

posted @ Wednesday, October 13, 2010 11:52 AM | Feedback (2)

Naked Thoughts on the Domain Model

In my previous place of employment, we spent a lot of time talking and thinking about chasing the software holy grail:  a framework capable of allowing developers to focus on a small subset of the technology stack, get everything else for free from the framework, and out the other end comes a fully functional application.  Of course, that application is assumed to be user friendly, fully functional, performant, and maintainable.  Over the years I tend to mock the idea to some degree, but I’m also a big believer that developers spent way too much time dealing with things that shouldn’t...

posted @ Tuesday, October 05, 2010 1:33 PM | Feedback (0)

Windows Phone 7 Developer Launch

Checkout this two day developer event for the WP7 launch at the Westin in downtown Detroit Windows Phone 7 Developer Launch: Jump Start Your Mobile Development (Day 1) Windows Phone 7 Developer Launch: Unleash Your Best App Workshop (Day 2)

posted @ Tuesday, October 05, 2010 12:48 PM | Feedback (0)

Serialization Cheatsheet

This post is intended to be a quick and dirty cheatsheet outlining how to turn an object into a string and back using the four serializers I use most:  DataContractSerializer, XmlSerializer, BinaryFormatter, and DataContractJsonSerializer.  There’s absolutely nothing special about this information as it’s all freely available on the web in a million different forms – I simply wanted this all in one place as I can easily find it the next time I need it. Ugly WCF Xml (DataContractSerializer): This is the default serializer used by WCF.  If you have a WCF service and you haven’t went out of...

posted @ Tuesday, October 05, 2010 10:57 AM | Feedback (0)