So, I required to assign my web project in separated application pool under Windows 2003 /IIS6 programmatically.
It is easy through System.DirectoryServices of .NET
There is, I create virtual directory "myWebDir" and assign it to new pool with the name "myAppPool":
Application pool is created automatically if third parameter is a true in the param array.
However, I would like also to manage my application pools without specific virtual directory.
Here are examples to create/remove application pools:
Create Application pool:
Remove Application pool:
Remove only works, if no one web application assigned to pool.