views:

262

answers:

2

I have an old classic ASP site I'm maintaining and in the midst of converting to asp.net. I've one page that has external endpoints posting data to it and I'd like capture/monitor the posts that are being made to this page. Does anyone know of any tools which I can use to dump these posts either to a log file or database somewhere?

I guess maybe this question could be directed at IIS as well? From what I've googled though this doesn't appear to be possibility in IIS either. Maybe there is an ISAPI extension that would do it?

+2  A: 

As Manos points out in a comment to your question you could simply dump the contents of the Request.Form and/or Request.QueryString collections to a file.

File locking is a concern but you could always use a new file for each post. Use a file name that is a combination of a formatted current date/time, the SessionID and some other random element. ASP will only handle one request for a sesssion at a time so there is no danger of a collision.

AnthonyWJones
I'm not sure, seems like something tech support would wring my neck for.
Dave
+1  A: 

As pointed out a couple times, you could dump the contents into some sort of collection. The previous suggestions were to dump it into a .txt (or whatever) file. Odds are good that you're not likely to run into a locking issue unless you're dumping a sizable amount of data, or you run an exceedingly active site.

Incidentally, that bit of information would help you get a better answer. ;)

How much traffic are we talking about? Simultaneous users? How much data is getting dumped anyway?

Lastly, if you don't like the file idea, then why not a database? Which one would depend on the answers to the traffic question...

AnonJr