Hi, can I know the request and the response page bytes (its length)? Thanks
"josh" wrote in message news:534158d4-ddad-4f25-b424-1988f653d932@n38g2000prl.googlegroups.com... > 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? -- Anthony Jones - MVP ASP/ASP.NET
On 4 Set, 15:18, "Anthony Jones" wrote: > "josh" wrote in message > > news:534158d4-ddad-4f25-b424-1988f653d932@n38g2000prl.googlegroups.com... > > > 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? > > -- > Anthony Jones - MVP ASP/ASP.NET 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?
"josh" wrote in message news:bc490d18-ce66-4e2f-9a97-95324c7ef70f@1g2000pre.googlegroups.com... On 4 Set, 15:18, "Anthony Jones" wrote: > "josh" wrote in message > > news:534158d4-ddad-4f25-b424-1988f653d932@n38g2000prl.googlegroups.com... > > > 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? > > -- > Anthony Jones - MVP ASP/ASP.NET 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. -- Anthony Jones - MVP ASP/ASP.NET
> 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" wrote in message news:0dbdfed3-35fe-4010-b5c5-00b35bab58e0@34g2000hsh.googlegroups.com... >> 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? > 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. -- Anthony Jones - MVP ASP/ASP.NET
Anthony Jones wrote: > 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. Log Parser from MS makes it fairly easy, and it can be used directly from a .NET program http://www.microsoft.com/technet/scriptcenter/tools/logparser/default.mspx Andrew