Yes, I could not get it to work as written - but I did get it to work with two changes:
Instead of using the PreSendRequest event, I used the PostRequestHandlerExecute. And I did not save the context in a private instance variable, instead I explicitly called the HttpContext.Current.Response.Output.Write() method in my event handler.
The code in the book works once, only the first time, in my experience.
Code:
void context_PostRequestHandlerExecute(Object sender, EventArgs e)
{
//alter outgoing request by adding HTML content
string message = @"<!-- This page has been post processed at " +
System.DateTime.Now.ToString() +
@" by a custom HttpModule. -->";
HttpContext.Current.Response.Output.Write(message);
}