# Named anchors with Posterous

January 17, 2011

Posterous automatically strips out id or name attributes that you apply to divs when you edit the HTML source of a post. One way around it is to add an empty anchor with a name attribute just before the section you want to name, like so:

<a name=”anchor_name”></a>


Then a #anchor_name fragment in the URL will work, . . .

# Generating a settings class from XML with T4

March 25, 2010

I’ve just posted a couple of T4 templates on CodePlex which you can use to generate a Settings class from XML. You get a compiled class which handles type checking, thread safety and loading and saving the settings to your database. You’ll never again have to worry about unloading your application when settings are updated.

A note . . .

# Entering and exiting HTTPS with ASP.NET MVC

March 24, 2010

I think I’ve found a relatively painless and DRY way to apply SSL/HTTPS selectively to certain actions in an ASP.NET MVC application.

I’ve looked into several approaches including Steve Sanderson’s self-admittedly hack-ish approach which I won’t go into here because it’s an excellent article revealing why this is a difficult problem . . .

# Random Word Generator

January 11, 2010

I wanted to auto-generate passwords that were random but not the sort of unreadable gibberish that comes from just combining letters and numbers (you know, stuff like 8ajOga64asiHip). Something close enough to language that a human can read it and remember it.

I couldn’t find anything like this, so I came up with my own random word . . .

# CAS on Windows: localhost setup in 5 mins

January 03, 2010

CAS (Central Authentication System) is a simple, secure single sign-on system. In my experience connecting CareerHub to university login systems, I love it when unis use CAS because it’s so elegantly simple to integrate with.

If you need to test CAS authentication in a Windows development environment, these step-by-step instructions . . .

# 2 More Reasons Why You Might Get A Blank Page in IIS7

October 28, 2009

I’m still fairly new to IIS 7 and getting used to the blank pages it serves up when it’s not happy with the way you’ve configured a website. It reminds me a bit of the kind of error handling you used to see sometimes in VB6 with

on error resume next

I think the philosophy that this sort of error-handling follows is along the . . .