亚洲乱色熟女一区二区三区丝袜,天堂√中文最新版在线,亚洲精品乱码久久久久久蜜桃图片,香蕉久久久久久av成人,欧美丰满熟妇bbb久久久

LOGO OA教程 ERP教程 模切知識(shí)交流 PMS教程 CRM教程 開(kāi)發(fā)文檔 其他文檔  
 
網(wǎng)站管理員

c#創(chuàng)建并設(shè)置應(yīng)用程序池

admin
2018年9月8日 15:42 本文熱度 6934
/// <summary>
/// 創(chuàng)建應(yīng)用程序池 IIS 7 默認(rèn)是 FrameWork 4.0  集成模式
/// </summary>
/// <param name="appPoolName"></param>
/// <param name="maxProcesses">最大進(jìn)程數(shù)</param>
/// <param name="queueLength">隊(duì)列長(zhǎng)度</param>
/// <param name="type">0為集成模式1為經(jīng)理模式</param>
public static bool CreateAppPool7(string appPoolName, long maxProcesses,long queueLength,string type)
{
    try
    {
        ServerManager sm = new ServerManager();
        //判斷是否存在應(yīng)用程序池
        ApplicationPool appPool = sm.ApplicationPools[appPoolName];
        if (appPool == null)
        {
            sm.ApplicationPools.Add(appPoolName);
            ApplicationPool apppool = sm.ApplicationPools[appPoolName];
            if ("0".Equals(type))
            {
                apppool.ManagedPipelineMode = ManagedPipelineMode.Integrated;//托管管道為集成模式  ManagedPipelineMode.Classic為經(jīng)典模式
            }
            else {
                apppool.ManagedPipelineMode = ManagedPipelineMode.Classic;//托管管道為經(jīng)典模式  ManagedPipelineMode.Classic為經(jīng)典模式
            }
         
            apppool.ManagedRuntimeVersion = "v4.0";  //當(dāng)設(shè)置錯(cuò)誤時(shí),會(huì)在應(yīng)用程序中創(chuàng)建一個(gè)不存在的版本,不會(huì)報(bào)錯(cuò)
            //應(yīng)當(dāng)檢測(cè)當(dāng)前電腦是否安裝 FrameWork 4.0 ,并處理沒(méi)有安裝時(shí)該怎么辦
            //apppool.QueueLength
            apppool.Recycling.DisallowOverlappingRotation = false;
            apppool.Recycling.PeriodicRestart.Time = TimeSpan.FromMinutes(0);
            apppool.Recycling.PeriodicRestart.Schedule.Add(TimeSpan.Parse("23:00:00"));
            apppool.Recycling.PeriodicRestart.Schedule.Add(TimeSpan.Parse("06:00:00"));
            apppool.Recycling.PeriodicRestart.Schedule.Add(TimeSpan.Parse("12:30:00"));
            apppool.Recycling.PeriodicRestart.Schedule.Add(TimeSpan.Parse("18:00:00"));
            apppool.Recycling.LogEventOnRecycle = RecyclingLogEventOnRecycle.Memory
                | RecyclingLogEventOnRecycle.Requests
                | RecyclingLogEventOnRecycle.ConfigChange
                | RecyclingLogEventOnRecycle.IsapiUnhealthy
                | RecyclingLogEventOnRecycle.OnDemand
                | RecyclingLogEventOnRecycle.PrivateMemory
                | RecyclingLogEventOnRecycle.Schedule
                | RecyclingLogEventOnRecycle.Time;
            apppool.Recycling.PeriodicRestart.Memory = 40960000;
            apppool.Recycling.PeriodicRestart.PrivateMemory= 0;
            apppool.ProcessModel.IdleTimeout = TimeSpan.FromMinutes(0);
            apppool.ProcessModel.MaxProcesses= maxProcesses;
            apppool.ProcessModel.ShutdownTimeLimit = TimeSpan.FromSeconds(120);//關(guān)閉時(shí)間限制設(shè)置為120秒
            apppool.QueueLength = queueLength;
            apppool.Cpu.Limit = 80000;
            apppool.Cpu.Action=ProcessorAction.KillW3wp;
            apppool.Failure.RapidFailProtection = false;
            apppool.AutoStart = true;
            sm.CommitChanges();
            apppool.Recycle();
          
        }
        else
        {
            //appPool.ManagedPipelineMode = ManagedPipelineMode.Integrated;//托管管道為集成模式  ManagedPipelineMode.Classic為經(jīng)典模式
            if ("0".Equals(type))
            {
                appPool.ManagedPipelineMode = ManagedPipelineMode.Integrated;//托管管道為集成模式  ManagedPipelineMode.Classic為經(jīng)典模式
            }
            else
            {
                appPool.ManagedPipelineMode = ManagedPipelineMode.Classic;//托管管道為經(jīng)典模式  ManagedPipelineMode.Classic為經(jīng)典模式
            }
            appPool.ManagedRuntimeVersion = "v4.0";  //當(dāng)設(shè)置錯(cuò)誤時(shí),會(huì)在應(yīng)用程序中創(chuàng)建一個(gè)不存在的版本,不會(huì)報(bào)錯(cuò)
            //應(yīng)當(dāng)檢測(cè)當(dāng)前電腦是否安裝 FrameWork 4.0 ,并處理沒(méi)有安裝時(shí)該怎么辦
            appPool.Recycling.DisallowOverlappingRotation = false;
            appPool.Recycling.PeriodicRestart.Time = TimeSpan.FromMinutes(0);
            appPool.Recycling.PeriodicRestart.Schedule.Clear();
            appPool.Recycling.PeriodicRestart.Schedule.Add(TimeSpan.Parse("23:00:00"));
            appPool.Recycling.PeriodicRestart.Schedule.Add(TimeSpan.Parse("06:00:00"));
            appPool.Recycling.PeriodicRestart.Schedule.Add(TimeSpan.Parse("12:30:00"));
            appPool.Recycling.PeriodicRestart.Schedule.Add(TimeSpan.Parse("18:00:00"));
            appPool.Recycling.LogEventOnRecycle = RecyclingLogEventOnRecycle.Memory
                | RecyclingLogEventOnRecycle.Requests
                | RecyclingLogEventOnRecycle.ConfigChange
                | RecyclingLogEventOnRecycle.IsapiUnhealthy
                | RecyclingLogEventOnRecycle.OnDemand
                | RecyclingLogEventOnRecycle.PrivateMemory
                | RecyclingLogEventOnRecycle.Schedule
                | RecyclingLogEventOnRecycle.Time;
            appPool.Recycling.PeriodicRestart.Memory = 40960000;
            appPool.Recycling.PeriodicRestart.PrivateMemory = 0;
            appPool.ProcessModel.IdleTimeout = TimeSpan.FromMinutes(0);
            appPool.ProcessModel.MaxProcesses = maxProcesses;
            appPool.ProcessModel.ShutdownTimeLimit = TimeSpan.FromSeconds(120);//關(guān)閉時(shí)間限制設(shè)置為120秒
            appPool.QueueLength = queueLength;
            appPool.Cpu.Limit = 80000;
            appPool.Cpu.Action = ProcessorAction.KillW3wp;
            appPool.Failure.RapidFailProtection = false;
            appPool.AutoStart = true;
            sm.CommitChanges();
            appPool.Recycle();
        }
    }
    catch
    {
        return false;
    }
    return true;
}

該文章在 2018/9/8 15:42:01 編輯過(guò)
關(guān)鍵字查詢(xún)
相關(guān)文章
正在查詢(xún)...
點(diǎn)晴ERP是一款針對(duì)中小制造業(yè)的專(zhuān)業(yè)生產(chǎn)管理軟件系統(tǒng),系統(tǒng)成熟度和易用性得到了國(guó)內(nèi)大量中小企業(yè)的青睞。
點(diǎn)晴PMS碼頭管理系統(tǒng)主要針對(duì)港口碼頭集裝箱與散貨日常運(yùn)作、調(diào)度、堆場(chǎng)、車(chē)隊(duì)、財(cái)務(wù)費(fèi)用、相關(guān)報(bào)表等業(yè)務(wù)管理,結(jié)合碼頭的業(yè)務(wù)特點(diǎn),圍繞調(diào)度、堆場(chǎng)作業(yè)而開(kāi)發(fā)的。集技術(shù)的先進(jìn)性、管理的有效性于一體,是物流碼頭及其他港口類(lèi)企業(yè)的高效ERP管理信息系統(tǒng)。
點(diǎn)晴WMS倉(cāng)儲(chǔ)管理系統(tǒng)提供了貨物產(chǎn)品管理,銷(xiāo)售管理,采購(gòu)管理,倉(cāng)儲(chǔ)管理,倉(cāng)庫(kù)管理,保質(zhì)期管理,貨位管理,庫(kù)位管理,生產(chǎn)管理,WMS管理系統(tǒng),標(biāo)簽打印,條形碼,二維碼管理,批號(hào)管理軟件。
點(diǎn)晴免費(fèi)OA是一款軟件和通用服務(wù)都免費(fèi),不限功能、不限時(shí)間、不限用戶的免費(fèi)OA協(xié)同辦公管理系統(tǒng)。
Copyright 2010-2025 ClickSun All Rights Reserved