public ResponseMessage.ResponseMessage CreateAppPool(ApplicationPool appPool)
 {
     try
     {
         bool checkAppPool = CheckAppPool(appPool);
         if (!checkAppPool)
         {
             ServerManager serverManager = new ServerManager();
             Microsoft.Web.Administration.ApplicationPool pool = serverManager.ApplicationPools.Add(appPool.applicationName);
             pool.Enable32BitAppOnWin64       = appPool.Enable32Bit;
             pool.ManagedPipelineMode         = (appPool.mode == "integrated " ? ManagedPipelineMode.Integrated : ManagedPipelineMode.Classic);
             pool.ManagedRuntimeVersion       = "v" + appPool.runTimeVersion;
             pool.Failure.RapidFailProtection = appPool.enableRapidFailure;
             serverManager.CommitChanges();
             Models.ResponseMessage.ResponseMessage rm = new ResponseMessage.ResponseMessage();
             rm.type    = "success";
             rm.message = "Anwendungspool erfolgreich erstellt";
             return(rm);
         }
         else
         {
             Models.ResponseMessage.ResponseMessage rm = new ResponseMessage.ResponseMessage();
             rm.type    = "error";
             rm.message = "Anwendungspool existiert bereits";
             return(rm);
         }
     }
     catch (Exception ex)
     {
         Models.Logger.Logger.CreateLogFile(ex.ToString());
         Models.ResponseMessage.ResponseMessage rm = new ResponseMessage.ResponseMessage();
         rm.type    = "error";
         rm.message = ex.ToString();
         return(rm);
     }
 }