I have a need to monitor what applications and process are using a given port for example a query of Active Directory for login by an application.
So what I want to do is: Application sends login credentials to AD. I want to see this request on the computer making the request, identify the the PID, record it with timestamp .. and if possible get the result of that query as successful or not.
Example of output:
ApplicationBahBlah_PID, 10:38:01:1234 , (Failed) ApplicationBahBlah_PID, 10:42:21:9734 , (Success)
I have looked here Using /proc/<pid>, how can I identify a network port number's application? But that is for Linux and also not C#