get page length

  • Thread starter Thread starter josh
  • Start date Start date
josh said:
Hi,

can I know the request and the response page bytes (its length)?

Request.InputStream.Length will give you the size of entity posted.

However Response.OutputStream.Length is not supported. Untill the request
is complete there is no way to know how big it will finally be.

What do you need this info for?
 
Request.InputStream.Length will give you the size of entity posted.

However Response.OutputStream.Length is not supported.  Untill the request
is complete there is no way to know how big it will finally be.

What do you need this info for?


I need this info bacause I must write a profiling application.

So I must know how time passes between one request and its response...

and I have to knowalso other info as that.

If I put Request.InputStream.Length in Page_Load
I have 0



Why?
 
Request.InputStream.Length will give you the size of entity posted.

However Response.OutputStream.Length is not supported. Untill the request
is complete there is no way to know how big it will finally be.

What do you need this info for?


I need this info bacause I must write a profiling application.

So I must know how time passes between one request and its response...

and I have to knowalso other info as that.

If I put Request.InputStream.Length in Page_Load
I have 0



Why?
For profiling why not use IIS logging?
Indeed there must be a zillion existing (and probably some free) profiling
tools.

The InputStream represents the entity body posted (and there isn't one for a
GET request) not the total size of the headers that have arrived.
 
For profiling why not use IIS logging?
Indeed there must be a zillion existing (and probably some free) profiling
tools.

Yes, but my boss wants a custom profiling application

The InputStream represents the entity body posted (and there isn't one for a
GET request) not the total size of the headers that have arrived.

Ok but (I also made searching on google) is it possible that I can't
know
the page request/response length?

Thanks for the answers.
 
josh said:
Yes, but my boss wants a custom profiling application



Ok but (I also made searching on google) is it possible that I can't
know
the page request/response length?

From inside ASP.NET no it isn't.

My advice would be to spend a day researching existing log analysers and
profilers. Turn on IIS Logging and spend another day determining how you
would write a custom app to analyse the generated log files. Estimate how
long it would take you to deliver the required features. Present a report
to your boss comparing the two approaches.

If you want to profile an ASP.NET application for test purposes to see where
you might improve performance then the job is allready done:-

http://www.fiddlertool.com/fiddler.
 
Back
Top