码迷,mamicode.com
首页 > Windows程序 > 详细

Windows2008操作系统 IIS7 IIS7.5 进程池经常死最终解决方案

时间:2015-10-09 22:55:53      阅读:265      评论:0      收藏:0      [点我收藏+]

标签:

 

作为一个服务器维护人员,经常遇到不可解决的问题,这问题一直存在,一直困扰我多时,经常凌晨1-2点起床,就为了重启一下进程池

技术分享

错误应用程序名称: w3wp.exe,版本: 7.5.7600.16385,时间戳: 0x4a5bd0eb
错误模块名称: ntdll.dll,版本: 6.1.7600.16385,时间戳: 0x4a5be02b
异常代码: 0xc0000374
错误偏移量: 0x00000000000c6cd2
错误进程 ID: 0xb54c
错误应用程序启动时间: 0x01d0c0d94f91529a
错误应用程序路径: c:\windows\system32\inetsrv\w3wp.exe
错误模块路径: C:\Windows\SYSTEM32\ntdll.dll
报告 ID: 8e9b8672-2ccc-11e5-9d45-90b11c3fe265

技术分享

// string method_Recycle = "Recycle"; //Start开启 Recycle回收 Stop 停止
string method_Start = "Start";
DirectoryEntry appPool = new DirectoryEntry("IIS://localhost/W3SVC/AppPools");
try
{
foreach (DirectoryEntry item in appPool.Children)
{
string AppPoolCommand = item.Properties["ManagedPipelineMode"].Value.ToString();
string ManagedRuntimeVersion = item.Properties["ManagedRuntimeVersion"].Value.ToString();//,net版本号
string AppPoolState = item.Properties["AppPoolState"].Value.ToString();//当前状态
if (AppPoolState != "2")
{
DirectoryEntry findPool = appPool.Children.Find(item.Name, "IIsApplicationPool");
findPool.Invoke(method_Start, null);
appPool.CommitChanges();
appPool.Close();
var IIsMsg = string.Format("[{0}],名称:[{1}],NET版本:{2},标识:{3},当前状态:[{4}],时间:{5}\n", "Windows2008 Server", item.Name, ManagedRuntimeVersion, item.SchemaClassName, "已启动", DateTime.Now.ToString());
WriteText(IIsMsg);
ImportDataLog.WriteLog(item.Name, IIsMsg);
}
}
//lblCount_text.Text = i.ToString();
}

技术分享

长期运行,给别人再CC攻击多几下都没问题,自动启动进程池!!

Windows2008操作系统 IIS7 IIS7.5 进程池经常死最终解决方案

标签:

原文地址:http://www.cnblogs.com/welcomesay/p/4865371.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!