I want to print out some tracing messages from
Global.asax.cs/Application_BeginRequest().
I easily got:
System.Web.HttpContext.Current.Request.RawUrl, and
System.Web.HttpContext.Current.Request.Params["HTTP_SOAPACTION"].
I would now like to get the entire:
System.Web.HttpContext.Current.Request.InputStream
.... and reset the InputStream back to the beginning so that the rest of
our application will continue to work as before.
I've tried doing:
Request.BinaryRead(length),
Request.InputStream.Position = 0,
Request.InputStream.Seek(0,SeekOrigin.Begin),
but none of them reset the stream pointer back to the beginning.
How can I peek at the _entire_ HttpRequest.InputStream _and_ leave it
untouched?