Easy To Deploy Identicon Handler
Yesterday I mentioned that Jeff Atwood and Jon Galloway wrote an Identicon implementation for .NET. It works beautifully, but they distributed the code as a Web Site Project, which I cannot deploy to my blog as is.
For those of us who prefer Web Application projects, I repackaged their code as compiled DLL and a handler file. This distribution will work for both Web Application Projects as well as Website Projects.
Just download the binaries, copy the DLL to your bin directory, copy the IdenticonHandler.ashx file to your website directory, and you are good to go. You can simply add an image tag that references your identicon handler.
<img src="IdenticonHandler.ashx?hash=hash-of-ip-address" />
You can also grab the Solution I used to prepare the binaries.
If you use Gravatar, consider using the identicon handler as the default image. That’s what I did for this website. That way, if the user does not have a gravatar, the identicon will show up instead. Better than nothing!