# Tuesday, 27 December 2005

We had a pretty mellow Christmas this year, visiting family up in Seattle and then finishing the festivities yesterday at our place.  In years past we’ve had some pretty crazed holiday seasons, so it was nice to chill for the weekend.  Got a chance to hang out with my sister and her new baby, my first nephew. 

We managed to work in some gadgets, as is traditional.  I got a new Highgear Axis watch, with compass, altimeter and barometer.  Very cool for geocaching.  Also got some extra software for my GPSr, so now I have topo maps that I can load onto it.  I have yet to try it out for caching, but I’m thinking the maps will be a big help. 

I got my son his very own Garmin GPS 60, which was a huge hit.  We went out Christmas morning so he could find his first geocache by himself, which he did quite quickly.  A chip off the old nerd block. :-)

For those of you who might happen to read this blog for the technical content that once was here, hopefully there’ll be a bit more in the weeks to come.  I’m starting to work with Indigo, WWF, and Enterprise Library 2.0, so I should have some interested tidbits to report soon.

Tuesday, 27 December 2005 11:15:50 (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
# Friday, 02 December 2005

I haven’t tried doing any WCF (formerly and still known as Indigo) development in probably 6 months or so, and some things have changed since then.  Also, this is the first time I’ve tried implementing a duplex contract.  I made some mistakes along the way, due in part to the fact that the sample code in the November CTP doesn’t match the docs (no surprise there).  Over all, though, it was way easier than I thought it might be.  Certainly easier then .NET Remoting, and the fact that there’s a built-in notion of a duplex contract solves tons of problems.

Anyway, I was trying to get my client to work, and for the life of me couldn’t figure out the errors I was getting, until it finally dawned on me.  Here’s what I had:

        static void Main(string[] args)

        {

            InstanceContext site = new InstanceContext(new CallbackHandler());

 

            // Create a proxy with the given client endpoint configuration.

            using (MyDuplexProxy proxy = new MyDuplexProxy(site))

            {

                proxy.Send("Joe");   

            }

            Console.ReadLine();

        }

    }

It’s probably obvious to everyone who isn’t me why this won’t work.  You can’t dispose of the proxy and still expect a callback.  Now that I say that it makes sense, but it didn’t occur to me for a while, since the callback itself isn’t on the proxy class. So, I changed one line to this:

        static void Main(string[] args)

        {

            InstanceContext site = new InstanceContext(new CallbackHandler());

 

            // Create a proxy with the given client endpoint configuration.

            using (MyDuplexProxy proxy = new MyDuplexProxy(site))

            {

                proxy.Send("Joe");   

                Console.ReadLine();

            }

        }

and everything worked out swimmingly.  I continue to be impressed with how well thought out Indigo is.  While many people like to point out how many mistakes MS has made over the years, you certainly can’t fault them for not learning from them. 

Friday, 02 December 2005 14:31:53 (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  |