Announcement

Collapse
No announcement yet.

Keeping logs of website vistors

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Keeping logs of website vistors

    How will you log visitor’s login name in asp based website?
    If you have disabled Anonymous right to use, then you’d be able to recover the value from:
    <%
    Response.Write Request.ServerVariables("LOGON_USER")
    ' or
    Response.Write Request.ServerVariables("AUTH_USER")
    %>
    [End users must be using IE to maintain NT Challenge/Response or Windows Authentication.] Netscape support is also possible, can access these variables by enabling Basic Authentication and Windows Authentication. This type of authentication is a little insecure, as the password is sent in plain text (with Windows Authentication, IE encrypts the password as it is being sent across).

    If Anonymous access is enabled, then there is another possibility, but IP should not be provided by DHCP. If end users are with static IP addresses, one can store their usernames in a table and find against their IP:
    <%
    Response.Write Request.ServerVariables("REMOTE_ADDR")
    %>
    If either of above is not possible, then option to use log in credentials (even only once, then storing a cookie).

  • #2
    Can't you use ASP.NET membership and roles together with the Login control, and use the GridView control to display the details of the logged in users, when they last logged in etc?
    Last edited by macocz; 29-01-09, 11:54 PM.

    Comment

    Working...
    X