Here’s an easy one for you:
I’m currently logging request duration via an HttpModule and I’d like to find out the number of bytes each page is as well.
HttpContext.Current.Response.OutputStream.Length throws a NotSupportedException.
What’s an easy way to do this?
I have an HttpModule that implements a stream rewriter. It derives from the Stream class. In my HttpModule I have the following code:
In the stream class I have the following code that overrides the default Write method:
You can just take the length of the string at the second point