Posts
All the articles I've posted.
Silverlight 3 Breaking Changes
Published:1 min readSilverlight 3 has a list of breaking changes from both the Silverlight 2 and Silverlight 3 Beta versions that can be found on MSDN. It is important to check this list if what you are reading does not make sense.
What is a "turd" configuration file?
Published:1 min readA Microsoft Connect response suggested storing settings on a per-project basis or keeping a small "turd" configuration file next to the .sln as a workaround.
WSCF.blue Beta Released: Are you doing contract-first?
Published:3 min readWSCF.blue is a Visual Studio Add-in designed to bring the benefits of contract-first web service development to those working with WCF (Windows Communication Foundation). It is the latest version of an earlier tool called WSCF and was created by a team of talented developers. The contract-first approach makes web services more interoperable, and the Beta version of WSCF.blue can be downloaded and tested.
Using REST in NAnt with a custom HTTP Task
Published:3 min readThis article describes how to make HTTP requests to a REST web service from a NAnt script using a custom task. The HttpClient class from the WCF REST Starter Kit is used, and the source code is available on GitHub. The assembly has been merged with the Microsoft.Http.dll dependency making deployment easier.
Velocity DataCache Extension Methods
Published:5 min readThis post provides code samples to demonstrate extension methods for working with the Velocity DataCache. This includes a method called IsLocalCache, a Get method that uses generics and a Func delegate to create objects if they are not found in the cache, and a CreateKey method to create keys for cache entries.
Mocking support in Microsoft Velocity
Published:2 min readMicrosoft Velocity does not have mocking support, making it difficult for developers to unit test code that uses the application cache. Microsoft should provide interfaces or make methods virtual to improve the API's support for unit testing.
C# wrapper for the Google AJAX Language API
Published:11 min readThis article discusses a C# wrapper for the Google AJAX Language API, which allows users to translate text using a REST based web service API. The WCF REST Starter Kit and DataContractJsonSerializer are used to make working with the API easier. The code is accompanied by a Visual Studio 2008 solution with full source code.
Bugs in the bit.ly REST API
Published:3 min readThis article discusses bugs found in bit.ly's REST API which prevent users from expanding URLs from its shortened representation by returning XML that includes the hash for the URL as one of the elements, which cannot start with a numeric or punctuation character. It also covers issues with serialization for .NET consumers and how other services in the bit.ly REST API do not suffer the same problem.
Compute any hash for any object in C#
Published:6 min readThis article explains how to create an extension method in C# that can be used to calculate the hash of any object using various hashing algorithms such as MD5 or SHA-1. The extension methods use the DataContractSerializer to turn the object into a byte array which is then passed into the Cryptographic Service Provider to compute the hash. The article also covers the two types of hashing functions and their implementations.
SQL Server 2008 SP1
Published:1 min readService Pack 1 for SQL Server 2008 is available for download, offering a rollup of cumulative updates and bug fixes. Despite lacking new features, the service pack is worthwhile due to the bug fixes it includes.