473,379 Members | 1,184 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

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
Jun 7 '07 #1
9 5022
On Jun 7, 10:50 am, "Andy Fish" <ajf...@blueyonder.co.ukwrote:
Hi,

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

Jun 7 '07 #2
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
Jun 7 '07 #3

"Alexey Smirnov" <al************@gmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...
On Jun 7, 10:50 am, "Andy Fish" <ajf...@blueyonder.co.ukwrote:
>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
Jun 7 '07 #4
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

AFHi,
AF>
AFI am wondering if there is any way to log the HTTP traffic on an IIS
AFserver (including headers but preferably the body as well), either
AFat the IIS or asp.net level
AF>
AFI know I could write my own isapi dll or .net filter, but I was
AFrather hoping someone else has already done it. I'm sure it's quite
AFa common requirement
AF>
AFAndy
AF>
Jun 7 '07 #5
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

AFHi,
AF>
AFI am wondering if there is any way to log the HTTP traffic on an IIS
AFserver (including headers but preferably the body as well), either
AFat the IIS or asp.net level
AF>
AFI know I could write my own isapi dll or .net filter, but I was
AFrather hoping someone else has already done it. I'm sure it's quite
AFa common requirement
AF>
AFAndy
AF>
Jun 7 '07 #6
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" <ne*****@msn.comwrote in message
news:a2***************************@msnews.microsof 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

AFHi,
AFAFI am wondering if there is any way to log the HTTP traffic on an
IIS
AFserver (including headers but preferably the body as well), either
AFat the IIS or asp.net level
AFAFI know I could write my own isapi dll or .net filter, but I was
AFrather hoping someone else has already done it. I'm sure it's quite
AFa common requirement
AFAFAndy
AF>
Jun 7 '07 #7
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

KSHTTPModule is only invoked once request is handed off to ASP.NET
KSISAPI extension:
KS>
KShttp.sys -IIS pipeline -determine extension -ASP.NET ISAPI
KSextension -ASP.NET pipeline
KS>
KSRequests for static files, for example, are handled by IIS Static
KSfile handler, not ASP.NET, so HTTPModule would never be invoked
KS(unless you map all file extensions to ASP.NET)
KS>
KSISAPI filter (or lower level tool, e.g. a packet capture tool) is
KSprobably the only way.
KS>
KSCheers
KSKen
KS"Michael Nemtsev" <ne*****@msn.comwrote in message
KSnews:a2***************************@msnews.micros oft.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

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

Jun 7 '07 #8
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" <ke*******@THISadOpenStatic.comwrote in message
news:ee**************@TK2MSFTNGP05.phx.gbl...
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" <ne*****@msn.comwrote in message
news:a2***************************@msnews.microsof 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

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

Jun 7 '07 #9
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 <nemt...@msn.comwrote:
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

KSHTTPModule is only invoked once request is handed off to ASP.NET
KSISAPI extension:
KS>
KShttp.sys -IIS pipeline -determine extension -ASP.NET ISAPI
KSextension -ASP.NET pipeline
KS>
KSRequests for static files, for example, are handled by IIS Static
KSfile handler, not ASP.NET, so HTTPModule would never be invoked
KS(unless you map all file extensions to ASP.NET)
KS>
KSISAPI filter (or lower level tool, e.g. a packet capture tool) is
KSprobably the only way.
KS>
KSCheers
KSKen
KS"Michael Nemtsev" <nemt...@msn.comwrote in message
KS>news:a2***************************@msnews.micro 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
AFHi,
AFAFI am wondering if there is any way to log the HTTP traffic on
an
IIS
AFserver (including headers but preferably the body as well),
either
AFat the IIS or asp.net level
AFAFI know I could write my own isapi dll or .net filter, but I
was
AFrather hoping someone else has already done it. I'm sure it's
quite
AFa common requirement
AFAFAndy
AF>- Hide quoted text -

- Show quoted text -

Jun 7 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: noah | last post by:
Does PHP have a feature to associate Cookie sessions with a persistent database connection that will allow a single transaction across multiple HTTP requests? Here is how I imagine my process: I...
2
by: Christopher Benson-Manica | last post by:
Is there a more crossbrowser-friendly means to make HTTP requests using script than the XML methods? I need to do this in IE 5.0, and it doesn't seem to have the ActiveX control that can make XML...
3
by: Chandra | last post by:
What happens to a cancelled http request from the server perspective? Here's the scenario. I request a page from the web server and page requires lot of processing. Before the response comes...
13
by: yawnmoth | last post by:
Say I wrote an ajax script to send out HTTP requests via ajax. Any cookies that I have associated with that site will be sent along with this HTTP request. Is there a way to prevent this from...
0
by: thorley | last post by:
Greetings, I'm now merrily on my way developing a FastCGI Server in python. Thanks to help of others on this list I've got a proof of concept up and running. Herein lies my question: My goal...
4
by: rzimerman | last post by:
I'm hoping to write a program that will read any number of urls from stdin (1 per line), download them, and process them. So far my script (below) works well for small numbers of urls. However, it...
4
by: yawnmoth | last post by:
Is it possible to send http requests with curl but not have curl wait for the response? The reason I ask is because I'd like to code a web app that can sorta start time consuming processes...
8
by: kikapu | last post by:
Hi to all, we are building a fairly complex system here in work, and we couldn't imagine from the start that we would spend too much time just to transfer safely some kind of characters from...
4
by: K | last post by:
Hello everyone, I understand that urllib and urllib2 serve as really simple page request libraries. I was wondering if there is a library out there that can get the HTTP requests for a given...
1
ashsa
by: ashsa | last post by:
Hi, Could someone please illustrate how to send and receive HTTP requests programmatically through any HTTP proxy. Say if I have the ip address and the port number of a...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.