Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Tricky question !!! logging file access

Reply
Thread Tools

Tricky question !!! logging file access

 
 
Ammar
Guest
Posts: n/a
 
      06-20-2004
A tricky question:
I have a file i my local web sever IIS which can be accessed through the
internet, how do i develope a log file to know who accessed the file and
when??
is it also possible to write a script that detects when the file is accessed
and send an e mail to a certain recepient (ex me) about the ip addresss and
time when the file was accessed?
Thanks
Ammar


 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      06-20-2004
Ammar wrote on 20 jun 2004 in microsoft.public.inetserver.asp.general:
> A tricky question:
> I have a file i my local web sever IIS which can be accessed through
> the internet, how do i develope a log file to know who accessed the
> file and when??


Why tricky, please explain?

This is normal ASP work, if you only want to log the IP-address [which
could just be a proxi server].

> how do i develope


By reading the many examples on the web.

Detect IP with request.servervariables("remote_addr")
Detect date/time with now()
Write it to a file with "file system object"

> is it also possible to write a script that detects when the file is
> accessed and send an e mail to a certain recepient (ex me) about the
> ip addresss and time when the file was accessed?


Yes.

Use one of the many asp email includes, like CDO, CDONTS, JMAIL, etc.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
 
Jeff Cochran
Guest
Posts: n/a
 
      06-21-2004
On Sun, 20 Jun 2004 21:42:57 GMT, "Ammar" <(E-Mail Removed)>
wrote:

>A tricky question:
>I have a file i my local web sever IIS which can be accessed through the
>internet, how do i develope a log file to know who accessed the file and
>when??
>is it also possible to write a script that detects when the file is accessed
>and send an e mail to a certain recepient (ex me) about the ip addresss and
>time when the file was accessed?


If it's accessed via HTTP request, it's already in the IIS logs. How
is it being accessed? If called from an ASP page, or it is an ASP
page (If neither, it would be off-topic here anyway...), then you can
send an email from that ASP page when the request is made.

Jeff
 
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
Logging exception with java.util.logging.Logger#log() to file only Royan Java 1 04-01-2008 09:42 PM
Re: Logging to a file and closing it again properly (logging module) Christoph Haas Python 1 06-14-2006 08:47 AM
Logging to a file and closing it again properly (logging module) Christoph Haas Python 0 06-12-2006 09:58 PM
a tricky if else(maybe not tricky but impossible) nirkheys@gmail.com C Programming 9 04-25-2006 06:13 PM
[java.util.logging] logging only to _one_ file Stefan Siegl Java 0 08-27-2003 12:29 PM



Advertisments