Tricky question !!! logging file access

Discussion in 'ASP General' started by Ammar, Jun 20, 2004.

  1. Ammar

    Ammar Guest

    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
    Ammar, Jun 20, 2004
    #1
    1. Advertising

  2. Ammar

    Evertjan. Guest

    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)
    Evertjan., Jun 20, 2004
    #2
    1. Advertising

  3. Ammar

    Jeff Cochran Guest

    On Sun, 20 Jun 2004 21:42:57 GMT, "Ammar" <>
    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
    Jeff Cochran, Jun 21, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stefan Siegl
    Replies:
    0
    Views:
    939
    Stefan Siegl
    Aug 27, 2003
  2. Christoph Haas
    Replies:
    0
    Views:
    431
    Christoph Haas
    Jun 12, 2006
  3. Christoph Haas
    Replies:
    1
    Views:
    440
    Vinay Sajip
    Jun 14, 2006
  4. Replies:
    9
    Views:
    521
    CBFalconer
    Apr 25, 2006
  5. Royan
    Replies:
    1
    Views:
    1,409
    Andrea Francia
    Apr 1, 2008
Loading...

Share This Page