第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

重新啟動(回收)應用程序池

重新啟動(回收)應用程序池

ibeautiful 2019-08-12 11:32:06
重新啟動(回收)應用程序池如何從C#(.net 2)重新啟動(回收)IIS應用程序池?感謝您發(fā)布示例代碼嗎?
查看完整描述

3 回答

?
慕后森

TA貢獻1802條經驗 獲得超5個贊

如果您使用的是IIS7,那么如果它已停止,則會執(zhí)行此操作。我假設你可以調整重啟而不必顯示。

// Gets the application pool collection from the server.[ModuleServiceMethod(PassThrough = true)]public ArrayList GetApplicationPoolCollection(){
    // Use an ArrayList to transfer objects to the client.
    ArrayList arrayOfApplicationBags = new ArrayList();

    ServerManager serverManager = new ServerManager();
    ApplicationPoolCollection applicationPoolCollection = serverManager.ApplicationPools;
    foreach (ApplicationPool applicationPool in applicationPoolCollection)
    {
        PropertyBag applicationPoolBag = new PropertyBag();
        applicationPoolBag[ServerManagerDemoGlobals.ApplicationPoolArray] = applicationPool;
        arrayOfApplicationBags.Add(applicationPoolBag);
        // If the applicationPool is stopped, restart it.
        if (applicationPool.State == ObjectState.Stopped)
        {
            applicationPool.Start();
        }

    }

    // CommitChanges to persist the changes to the ApplicationHost.config.
    serverManager.CommitChanges();
    return arrayOfApplicationBags;}

如果您使用的是IIS6,我不太確定,但您可以嘗試獲取web.config并編輯修改日期或其他內容。對web.config進行編輯后,應用程序將重新啟動。


查看完整回答
反對 回復 2019-08-12
?
繁華開滿天機

TA貢獻1816條經驗 獲得超4個贊

開始了:

HttpRuntime.UnloadAppDomain();


查看完整回答
反對 回復 2019-08-12
  • 3 回答
  • 0 關注
  • 766 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號