Logging bytes received and sent from ASP.NET application

  • Thread starter Thread starter Andy M
  • Start date Start date
A

Andy M

Hi,

I am writing a logging component to my web application. Two things that
I have not been able to work out are how to get, in bytes, the size of
the request, and the size of the response.

I have seen that the IIS logs can output this information, however I
have not found a way to match this information with the rest of the
information that I am logging.

I also cannot see anything in the Request or Response classes that would
give me the information I need.

Could someone let me know where I might be able to find out how to
capture that information? Or, and this is less desirable but an
acceptable cludgy workaround, if there is any way to match up the IIS
logs entries with my own log?

Cheers,
Andy.
 
Andy said:
Hi,

I am writing a logging component to my web application. Two things that
I have not been able to work out are how to get, in bytes, the size of
the request, and the size of the response.

I have seen that the IIS logs can output this information, however I
have not found a way to match this information with the rest of the
information that I am logging.

I also cannot see anything in the Request or Response classes that would
give me the information I need.

Could someone let me know where I might be able to find out how to
capture that information? Or, and this is less desirable but an
acceptable cludgy workaround, if there is any way to match up the IIS
logs entries with my own log?

Cheers,
Andy.


Does Request.ContentLength not give te desired information?
Don't know anything similar for Response.

Else you can take a look at HttpModules, I think that can give you all
the possibilities foor advanced logging.

--

//Rutger

(e-mail address removed)
www.RutgerSmit.com
 
Back
Top