October 2010 Blog Posts
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 )
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
...
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;
...
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...
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
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...
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)
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...