It’s pretty much just copy-paste of the server variables stuff and populating from the HttpContext.Session. Works For Me
(against r694) – SessionVariables.diff
You can apply this after checking out a copy from http://code.google.com/p/elmah/source/checkout