Can I get the Process ID of a worker process in a web application?
-
13-07-2021 - |
Question
I have an application that runs in an application pool that has muliple worker processes.
I need to access the process id in the controller to check some issues I have since I changed the application pool to use multiple worker processes.
Solution
This gets the process id
System.Diagnostics.Process.GetCurrentProcess().Id
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow