Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > logging all HTTP requests

Reply
Thread Tools

logging all HTTP requests

 
 
Andy Fish
Guest
Posts: n/a
 
      06-07-2007
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


 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      06-07-2007
On Jun 7, 10:50 am, "Andy Fish" <(E-Mail Removed)> 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 With Quote
 
 
 
 
Andrew Morton
Guest
Posts: n/a
 
      06-07-2007
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 With Quote
 
Andy Fish
Guest
Posts: n/a
 
      06-07-2007

"Alexey Smirnov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> On Jun 7, 10:50 am, "Andy Fish" <(E-Mail Removed)> 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 With Quote
 
Michael Nemtsev
Guest
Posts: n/a
 
      06-07-2007
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 With Quote
 
Michael Nemtsev
Guest
Posts: n/a
 
      06-07-2007
Hello Andy,

I'd recommend this article http://msdn.microsoft.com/msdnmag/is...s/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 With Quote
 
Ken Schaefer
Guest
Posts: n/a
 
      06-07-2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) t.com...
> 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 With Quote
 
Michael Nemtsev
Guest
Posts: n/a
 
      06-07-2007
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" <(E-Mail Removed)> wrote in message
KS> news:(E-Mail Removed) t.com...
KS>
>> 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 With Quote
 
Andy Fish
Guest
Posts: n/a
 
      06-07-2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) t.com...
>> 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 With Quote
 
David Wang
Guest
Posts: n/a
 
      06-07-2007
Products like TeaLeaf do what was originally asked and exist.

If you are looking for a free solution, I don't know of any.

For the theoretically inclined:

IIS6 Request Processing Details:
http://blogs.msdn.com/david.wang/arc...cs_Part_1.aspx

IIS6 solutions involve any combination of the following techniques:
- How to read request entity body -
http://blogs.msdn.com/david.wang/arc...ith-ISAPI.aspx
- ISAPI Filter reading ALL_RAW ServerVariable after
SF_NOTIFY_AUTH_COMPLETE event to retrieve effective request headers
- ISAPI Filter listening to SF_NOTIFY_SEND_RAW_DATA to capture
response stream. Kills performance by disabling platform advantages
like TransmitFile for StaticFiles and kernel response cache for
Dynamic Files.

IIS7 solutions
- Existing IIS6 solution works with same caveats
- Native code Module listening on READ_ENTITY and SEND_ENTITY to
buffer
- Existing HttpModule and HttpHandler techniques can be applied to any/
all resources on a per-app basis (CANNOT configure one codebase to run
globally for any/all requests - read this for why -
http://blogs.msdn.com/david.wang/arc...d-in-IIS7.aspx
)


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//




On Jun 7, 4:25 am, Michael Nemtsev <(E-Mail Removed)> wrote:
> 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" <(E-Mail Removed)> wrote in message
> KS>news:(E-Mail Removed) soft.com...
> KS>
>
>
>
> >> Hello Andy,

>
> >> I think that you need to implement HttpModule which will just log all
> >> request to the desired location
> >> Start from herehttp://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>- Hide quoted text -

>
> - Show quoted text -



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested HTTP params on ruby HTTP requests Dave Garcia Ruby 5 06-05-2009 08:15 AM
Preventing IIS logging webresource.axd requests James Hawkins ASP .Net 2 11-16-2006 09:57 AM
web requests and mobile requests Fernando Arámburu ASP .Net 1 04-08-2005 07:13 PM
Redirect all http requests to web application Brian Smith ASP .Net 1 02-20-2004 09:15 PM
Re: Http Module Problem: not all requests hit my module why? Jiong Feng ASP .Net 2 11-29-2003 05:14 PM



Advertisments