Hi @iLens
If this returns 2, how can I terminate this second process (for instance, can I just use system.diagnostics.process.kill)?
Open IIS manager and on the left side click on the name of your computer. You will then see a similar list of icons on the right as shown in the screenshot below. Double click on "Worker Processes" and you can get a list of which processes are currently running, here you can find your second process.
Open the Windows Task Manager, ensure that the PID and Command Line columns are shown on the screen. For the second process, you can end it.
I can reset the app pool max worker process limit by using mypool.ProcessModel.MaxProcesses = 1, but does this take effect immediately or do I need to stop and restart the app pool (and if so, how) ?
You need to stop and restart the app pool to make the MaxProcesses setting take effect.
How can I force IIS to start a second worker process to test this is all working?
You can terminate other worker processes, leaving only a second worker process.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.