locked
Remote Access home page access RRS feed

  • Question

  • Is there a way to know if someone has browsed to your https://*.homeserver.com home page? I mean they just browse to the page, not actually log in. Would that be something I can see in the Event Viewer maybe?
    Wednesday, January 14, 2009 8:36 PM

Answers

  • Interesting...If you download Log Parser from Microsoft you can write SQL like queries against your IIS logs. Here is a sample batch file that I developed. Just copy the contents below to a file with a .bat extension and run it. The batch file will produce a comma seperated file (export.csv) in the c:\WHS_Logs directory that contains any hits to your website that are from external addresses. The CSV file can then easily be viewed from excel.

    REM ------- START OF BATCH FILE ---------
    c:
    md c:\WHS_Logs
    cd "c:\Program Files\Log Parser 2.2\"
    LogParser -o:csv -i:W3C "select date,time,c-ip,cs-method,cs-uri-stem,cs-uri-query into c:\WHS_Logs\export.csv from c:\windows\system32\LogFiles\W3SVC1\*.log where cs-method = 'GET' and ( c-ip <> '127.0.0.1' and c-ip NOT LIKE '192.%')"
    REM ------- END OF BATCH FILE -----------

    I think this should be the answer to your problem. An add-on could still be developed but I think this is more than sufficient!

    • Marked as answer by AJMcS Thursday, January 15, 2009 3:20 AM
    Thursday, January 15, 2009 1:56 AM

All replies

  • You can modify the aspx pages to log user information anytime someone visits your home page. However, I do not think this functionality is included out of the box.

    If you know .NET you could easily read the HTTP Request variables and write them out to a text file. You could even write an add-in to display the records in a grid.
    Wednesday, January 14, 2009 9:02 PM
  • Thanks Mike. Looking for something simple because an IT professional I am not. 
    Wednesday, January 14, 2009 9:29 PM
  • Another option would be to look into the IIS logs (folder names starting with W3SVC) on the server under C:\Windows\system32\Logfiles.
    (But also not too simple to read them.)
    Best greetings from Germany
    Olaf
    • Marked as answer by AJMcS Wednesday, January 14, 2009 11:23 PM
    • Unmarked as answer by AJMcS Thursday, January 15, 2009 3:19 AM
    Wednesday, January 14, 2009 10:23 PM
    Moderator
  • This sounds like it could be a useful add-in. I will look into it a little bit and see if the IIS log has what you need. If I have time I will try to code something up and post it.
    Thursday, January 15, 2009 1:15 AM
  • Interesting...If you download Log Parser from Microsoft you can write SQL like queries against your IIS logs. Here is a sample batch file that I developed. Just copy the contents below to a file with a .bat extension and run it. The batch file will produce a comma seperated file (export.csv) in the c:\WHS_Logs directory that contains any hits to your website that are from external addresses. The CSV file can then easily be viewed from excel.

    REM ------- START OF BATCH FILE ---------
    c:
    md c:\WHS_Logs
    cd "c:\Program Files\Log Parser 2.2\"
    LogParser -o:csv -i:W3C "select date,time,c-ip,cs-method,cs-uri-stem,cs-uri-query into c:\WHS_Logs\export.csv from c:\windows\system32\LogFiles\W3SVC1\*.log where cs-method = 'GET' and ( c-ip <> '127.0.0.1' and c-ip NOT LIKE '192.%')"
    REM ------- END OF BATCH FILE -----------

    I think this should be the answer to your problem. An add-on could still be developed but I think this is more than sufficient!

    • Marked as answer by AJMcS Thursday, January 15, 2009 3:20 AM
    Thursday, January 15, 2009 1:56 AM
  • Wow Mike, this looks powerful. I page through a few IIS logs and see IP addresses which could be mined, but don't know anything about GETs. I understand the gist of what you're doing here and will give it a try. Thanks so much!   Jeff 
    Thursday, January 15, 2009 3:19 AM
  • I am glad to help. Here are some definitions that may help you better understand the log.
    • GET is the most common HTTP method; it says "give me this resource
    • A HEAD request is just like a GET request, except it asks the server to return the response headers only, and not the actual    resource (i.e. no message body).
    • A POST request is used to send data to the server to be processed in some way, like when you submit an online form. Or when you login into the WHS portal.
    Thursday, January 15, 2009 1:28 PM