Can anyone suggest a good approach to measuring how much (in kilobytes) each page that is rendered amounts to? I'm thinking that an HttpHandler or ISAP filter is the right method, but have no idea how to determine how how much each request is taking. SPecifically,
I want to determine the total amount of bandwidth sent to a given user for one page hit (including images, text etc.) Can anyone kindly point me in the right direction? Much appreciated! nuge
Did you try the different control variables in control panel -> admin tools -> performance, under asp.net? There are so many different, I am sure you can find one that tells you just what you need. I think you can read the value of these parameters from code
as well. ---------- MIC2000
First, you certainly don't need an ISAP filter. I would use an HttpModule to check the length of pages because you want to check all the pages' length (I think?). If you wanted to check just an individual page's size, then i'd use an HttpHandler and use a special
extension for the page itself by changing it from .aspx to .whatever, that way you don't incur the hit of checking all pages' length in the HttpModule. Anyway, depending on where you want to implement the check, all you have to do is get the current context
of the httpapplication and check the Request.ContentLength property. This will give you the size of the request. Your other option is to use a simple tool, like WebLog Expert Lite (free), and just turn on the logging option in IIS to check for the stats you
want to look at and then use the tool to get the bandwidth being used, what pages are being accessed, images most requested, etc. etc. It's a very good (and easy to use) tool.
You can't accurately figure out the total length of a page including images, etc, because those are not handled by the pipeline by default. You need an external tool (ISAPI or a third-party add-on) for this. Look at the packets when you request
a web page. It's not only the aspx itself that constitutes the request. It's also images, css, js, you name it. They are retrieved after the page is loaded and it's usually done so by the browser on multiple threads.
None
0 Points
30 Posts
Determining the size of each page request?
Feb 25, 2004 03:20 AM|nuge|LINK
None
0 Points
7 Posts
Re: Determining the size of each page request?
Apr 05, 2004 02:16 PM|myindycar2000|LINK
Member
20 Points
491 Posts
Re: Determining the size of each page request?
Apr 05, 2004 03:27 PM|chapel21|LINK
Member
130 Points
293 Posts
Re: Determining the size of each page request?
Apr 05, 2004 04:24 PM|MilanNegovan|LINK
http://www.AspNetResources.com
ASP.NET With Emphasis On Web Standards
None
0 Points
49 Posts
Re: Determining the size of each page request?
Apr 06, 2004 11:14 AM|gooberdlx|LINK