I had the goal of ensuring all traffic on a web site was via SSL, and also using the canonical hostname, i.e. www.mysite.com rather than just mysite.com.
After installing URL Rewrite 2.0 on IIS, this was achieved by adding the following to the site's root web.config file.