Design considerations

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • madankarmukta
    Contributor
    • Apr 2008
    • 308

    Design considerations

    Hi All,
    This is the ASP.net 3.5 web application.

    Here is an objective we want to achieve.

    Objective - To log Last logon Time for the user.

    The logic requires accessing certain business layer components and some of the Data layer methods. User can get into an application from any page. To be more precise - an objective is to log the last logon time of the user no matter what page user may land on to access an application.

    Is that going to be the good design practice to implement this logic in session_start event?
    If so, will accessing business layer and data access layer components in session_start prove to be a valid design scenario?

    Please guide.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    There are several ways to authenticate a user.

    Check out:

    When the user authenticates with your website, log the date/time that the authentication occurred at.


    -Frinny

    Comment

    • madankarmukta
      Contributor
      • Apr 2008
      • 308

      #3
      Hi,

      Thank you for the reply.

      However, it's not an authentication we are trying to perform. Rather we are trying to find the place in an application where we can implement the scenario.
      Please guide us if you have any suggestions in the direction.

      Comment

      • wbinfotchsol
        New Member
        • Aug 2012
        • 1

        #4
        I agree with your conclusions and will eagerly look forward to your future updates from next one. Just saying thanks will not just be enough, for the fantastic clarity in you guys answer.

        Comment

        • ariful alam
          New Member
          • Jan 2011
          • 185

          #5
          You can use database table name like user_log to store the last log in date and time. whenever a user log in to the application it will store the current log in time and query the 2nd last log in time to show on your application.

          Comment

          • madankarmukta
            Contributor
            • Apr 2008
            • 308

            #6
            @ariful alam,

            Thank you for the reply.

            How much is that good practice to implement the logic in session_start event ?

            Please guide.

            Comment

            • ariful alam
              New Member
              • Jan 2011
              • 185

              #7
              is session_start log a users log in information long time?

              Comment

              • madankarmukta
                Contributor
                • Apr 2008
                • 308

                #8
                This is the basically the sceptical topic - we are hunting for.

                To log a user's last log in information - would session_start going to be the suitable event.Please guide.

                Comment

                • Mudassir
                  New Member
                  • May 2012
                  • 85

                  #9
                  well you can use a database table as suggested by ariful alam, but i would like to suggest that delete the previous record from the datatable every time a new record is entered to preserve memory.
                  ...
                  Addan

                  Comment

                  • Frinavale
                    Recognized Expert Expert
                    • Oct 2006
                    • 9749

                    #10
                    Strange, I would have done it when the user authenticates.

                    The database trigger was a good suggestion :)

                    -Frinny

                    Comment

                    Working...