Search code examples
asp.net-mvc-3authenticationhttp-headersauditing

User login auditing - best practices


As per of login auditing, I want to store http request related information in repository. One thing that comes in mind is the client IP address. Are there any other important fields from http request object that should be stored also? I want to do it for case when someone login successfully as well as when login failed as well.


Solution

  • If you also grabbed HTTP_USER_AGENT, REMOTE_HOST, and REMOTE_USER, those could be combined to find a unique machine making the request if they happen to be from the same ip address.