示例#1
0
        private void TryFindAppPool(ManagementScope scope, string name)
        {
            var        service = new IisService("localhost");
            IisAppPool appPool = service.FindAppPoolByName(name);

            Console.WriteLine("found app pool: " + (appPool != null));
        }
示例#2
0
        public void SetAppPoolIdentity()
        {
            IisService service = new IisService("localhost");
            IisAppPool appPool = service.FindAppPoolByName("GiP");

            appPool.Identity = new Iis6AppPoolIdentity {
                IdentityType = Iis6AppPoolIdentityType.NetworkService
            };
        }
示例#3
0
 public void SetAppPoolIdentity()
 {
     IisService service = new IisService("localhost");
     IisAppPool appPool = service.FindAppPoolByName("GiP");
     appPool.Identity = new Iis6AppPoolIdentity {IdentityType = Iis6AppPoolIdentityType.NetworkService};
 }
示例#4
0
        private void TryFindAppPool(ManagementScope scope, string name)
        {
            var service = new IisService("localhost");
            IisAppPool appPool = service.FindAppPoolByName(name);

            Console.WriteLine("found app pool: " + (appPool != null));
        }