get page length

A

Anthony Jones

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?
 
J

josh

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?
 
A

Anthony Jones

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.
 
J

josh

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.
 
A

Anthony Jones

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,164
Messages
2,570,898
Members
47,439
Latest member
shasuze

Latest Threads

Top