User log - ASP.NET

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bobbystrain
    New Member
    • Sep 2007
    • 11

    User log - ASP.NET

    I have a website that uses the ASP.NET membership provider with a SQL Server Database. I want to keep a log of every login and time logged in. Is there a prepackaged control or code plug-in to accomplish this?

    Thank you for your help.

    Bobby
    Last edited by jhardman; Feb 11 '08, 06:21 PM. Reason: moved to .Net forum. ASP forum is for "classic" ASP
  • nateraaaa
    Recognized Expert Contributor
    • May 2007
    • 664

    #2
    There is a free tool available called Log4Net. This will allow you to log to a text file.

    Check this site for info on implementing Log4Net.

    Nathan

    Comment

    • bobbystrain
      New Member
      • Sep 2007
      • 11

      #3
      Originally posted by nateraaaa
      There is a free tool available called Log4Net. This will allow you to log to a text file.

      Check this site for info on implementing Log4Net.

      Nathan
      Thank you, Nathan. I will check it out.

      Bobby

      Comment

      • bobbystrain
        New Member
        • Sep 2007
        • 11

        #4
        Nathan,

        This is a lot more than I wanted. I was looking for a few lines of code to log the time when a users logs in and when they quit or logout. And write the information to a text file on the site. Any more leads for this?

        Thanks again,

        Bobby

        Comment

        • abev
          New Member
          • Jan 2008
          • 22

          #5
          Originally posted by bobbystrain
          Nathan,

          This is a lot more than I wanted. I was looking for a few lines of code to log the time when a users logs in and when they quit or logout. And write the information to a text file on the site. Any more leads for this?

          Thanks again,

          Bobby
          Bobby I have this in a app (both form and web) where I log the time when the user logs in and the user logs out. On successful login and logout I write the time to the database.

          Would that work?

          Comment

          • bobbystrain
            New Member
            • Sep 2007
            • 11

            #6
            Originally posted by abev
            Bobby I have this in a app (both form and web) where I log the time when the user logs in and the user logs out. On successful login and logout I write the time to the database.

            Would that work?
            abev,

            If you post it or send it, I should be able to adapt it to write to a text file rather than the database. Or maybe even write to the DB.

            Thanks,

            Bobby

            Comment

            Working...