After installing the following security update http://support.microsoft.com/kb/928365/ Request.Headers.Add on Windows 2003 will fail with a PlatformNotSupportedException
[PlatformNotSupportedException: Operation is not supported on this platform.]
System.Web.HttpHeaderCollection.Add(String name, String value) +2683180
HelloWorldModule.context_BeginRequest(Object sender, EventArgs e) +79
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
This is because this is only supported on the IIS7 platform.
An alternative way of setting the headers in BeginRequest of an HTTPModule can be found in the comments of the following blog
http://bigjimindc.blogspot.com/2007/07/ms-kb928365-aspnet-requestheadersadd.html