Generating a settings class from XML with T4

Luke Sampson
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 about the 2 . . .

Read More

Entering and exiting HTTPS with ASP.NET MVC

Luke Sampson
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 with . . .

Read More

Random Word Generator

Luke Sampson
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 generator . . .

Read More

CAS on Windows: localhost setup in 5 mins

Luke Sampson
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 should . . .

Read More

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

Luke Sampson
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 lines of “never . . .

Read More

Ruby on Rails editors for Windows

Luke Sampson
August 22, 2009

I’ve recently started learning Ruby and naturally one of the first things I needed to do was to find a good development environment. Notepad2 is great for Hello World applications but for anything more complex it becomes a bit painful. So I began my search for the best Ruby (and Rails) development environment I could find on Windows.

Of . . .

Read More

ASP.NET MVC 1.0 Areas

Luke Sampson
June 14, 2009

Areas (or grouping controllers into subsections of a site) are planned for ASP.NET MVC 2.0, but in the meantime there is a way to get this working with the current release.

Phil Haack’s nice area prototype hasn’t been updated since the release candidate of ASP.NET MVC, but it still works with version 1.0 by following his instructions.

But . . .

Read More

Archive
  Subscribe by Email and Never Miss a Post