I have developed a SharePoint application with custom login page using form based authentication and Active directiory
Now I want to log the failed login attempt in the application as well as who is login in the system.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
We can use SPDiagnosticsService.Local.WriteTrace method to add log to ULS log in custom login page.
In order to make ULS logging work for a AppPool account that is not Administrator, you have to add your AppPool user to "Performance Log Users" group.