Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Asp.Net Programming

logging all HTTP requests


Hi,

I am wondering if there is any way to log the HTTP traffic on an IIS server
(including headers but preferably the body as well), either at the IIS or
asp.net level

I know I could write my own isapi dll or .net filter, but I was rather
hoping someone else has already done it. I'm sure it's quite a common
requirement

Andy

On Jun 7, 10:50 am, "Andy Fish" <ajf@blueyonder.co.uk> wrote:

> Hi,

> I am wondering if there is any way to log the HTTP traffic on an IIS server
> (including headers

What about IIS log?

-----------------------------------------------Reply-----------------------------------------------

Andy Fish wrote:
> I am wondering if there is any way to log the HTTP traffic on an IIS
> server (including headers but preferably the body as well), either at
> the IIS or asp.net level

> I know I could write my own isapi dll or .net filter, but I was rather
> hoping someone else has already done it. I'm sure it's quite a common
> requirement

Wireshark (formerly Ethereal)?

Andrew

-----------------------------------------------Reply-----------------------------------------------

"Alexey Smirnov" <alexey.smir@gmail.com> wrote in message

news:1181207364.003923.258590@p77g2000hsh.googlegroups.com...
> On Jun 7, 10:50 am, "Andy Fish" <ajf@blueyonder.co.uk> wrote:
>> Hi,

>> I am wondering if there is any way to log the HTTP traffic on an IIS
>> server
>> (including headers

> What about IIS log?

do you mean the standard log file which appears automatically in the
windows/system32 (WTF !?!) directory?. Yes, this logs some information but I
need access to at lest all the HTTP headers in both directions and
preferably the body too

-----------------------------------------------Reply-----------------------------------------------
Hello Andy,

I think that you need to implement HttpModule which will just log all request
to the desired location
Start from here http://www.15seconds.com/issue/020417.htm

---
WBR,  Michael  Nemtsev [.NET/C# MVP].  
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

AF> Hi,
AF>
AF> I am wondering if there is any way to log the HTTP traffic on an IIS
AF> server (including headers but preferably the body as well), either
AF> at the IIS or asp.net level
AF>
AF> I know I could write my own isapi dll or .net filter, but I was
AF> rather hoping someone else has already done it. I'm sure it's quite
AF> a common requirement
AF>
AF> Andy
AF>

-----------------------------------------------Reply-----------------------------------------------

Hello Andy,

I'd recommend this article http://msdn.microsoft.com/msdnmag/issues/02/08/HTTPFilters/default.aspx
to my previous post

---
WBR,  Michael  Nemtsev [.NET/C# MVP].  
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

AF> Hi,
AF>
AF> I am wondering if there is any way to log the HTTP traffic on an IIS
AF> server (including headers but preferably the body as well), either
AF> at the IIS or asp.net level
AF>
AF> I know I could write my own isapi dll or .net filter, but I was
AF> rather hoping someone else has already done it. I'm sure it's quite
AF> a common requirement
AF>
AF> Andy
AF>

-----------------------------------------------Reply-----------------------------------------------

HTTPModule is only invoked once request is handed off to ASP.NET ISAPI
extension:

http.sys -> IIS pipeline -> determine extension -> ASP.NET ISAPI
extension -> ASP.NET pipeline

Requests for static files, for example, are handled by IIS Static file
handler, not ASP.NET, so HTTPModule would never be invoked (unless you map
all file extensions to ASP.NET)

ISAPI filter (or lower level tool, e.g. a packet capture tool) is probably
the only way.

Cheers
Ken

--
My IIS Blog: www.adOpenStatic.com/cs/blogs/ken

"Michael Nemtsev" <nemt@msn.com> wrote in message

news:a279a63a3f646f8c97723d97cb3f6@msnews.microsoft.com...

Hello Ken,

hmmm..
What about IIS7? The same ISAPI stuff?

---
WBR,  Michael  Nemtsev [.NET/C# MVP].  
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

KS> HTTPModule is only invoked once request is handed off to ASP.NET
KS> ISAPI extension:
KS>
KS> http.sys -> IIS pipeline -> determine extension -> ASP.NET ISAPI
KS> extension -> ASP.NET pipeline
KS>
KS> Requests for static files, for example, are handled by IIS Static
KS> file handler, not ASP.NET, so HTTPModule would never be invoked
KS> (unless you map all file extensions to ASP.NET)
KS>
KS> ISAPI filter (or lower level tool, e.g. a packet capture tool) is
KS> probably the only way.
KS>
KS> Cheers
KS> Ken
KS> "Michael Nemtsev" <nemt@msn.com> wrote in message
KS> news:a279a63a3f646f8c97723d97cb3f6@msnews.microsoft.com...
KS>

Thanks for all the replies

I have read up a bit about the asp.net pipeline and, as I am currently only
interested in asp.net requests, I think IHttpModule will do it for me.

I was just hoping that someone had already invented this so I wouldn't have
to write it myself, but it doesn't look like it's available off the shelf. I
would think it's a common requirement.

I have previously tried ethereal and the other obvious alternative which is
a proxy with logging. these are just a bit more cumbersome to use than
having logging built into the web server.

Andy

"Ken Schaefer" <kenREM@THISadOpenStatic.com> wrote in message

news:eeQcvTPqHHA.4004@TK2MSFTNGP05.phx.gbl...

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc