0 Comments

If you want to determine if an ApplicationPool exists in IIS7 you can use the following code:

        public bool Exists(string name)
        {
            bool result = false;

            using (ServerManager manager = new ServerManager())
            {
                result = manager.ApplicationPools.Any(t => t.Name == name);
            }

            return result;
        }

You can find the Microsoft.Web.Administration.dll in "%windir%\System32\inetsrv".

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts

JSON Serialization and Deserialization

0 Comments

Found a good articale on JSON Serialization and Deserialization: http://www.codeproject.com/Articles/272335/JSON-Serialization-and-Deserialization-in-ASP-NET…