Search code examples
asp.net-mvcauthenticationaudit

Record user Login to a ASP.NET MVC Application


I am developing a ASP.NET MVC aplication and I need to record the history of logins of a User. I need something similar to the last seen here in Stack Overflow (I will be keeping the history, I don't know if SO does this). I want to know what is the best way to do it?

  • Global.asax: Application_AuthenticateRequest, Application_AuthorizeRequest, Session_Start
  • Site.Master

any other, Pros and Cons of everyone?

Thanks


Solution

  • I end doing this:

    I put in the global.asax in protected void Session_Start() and in the authorization routine.