- 浏览: 4184075 次
最新评论
[C#]服务为何会依赖于WMI Performance Adapter服务
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
[C#]服务为何会依赖于WMI Performance Adapter服务
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
现象
我们的C#编写的Windows Service“CommandListener”在Windows 2000上运行正常,但是在Windows 2003上却总是依赖于“WMI Performance Adapter”服务的启动。
而“WMI Performance Adapter”服务一般是手动启动的,这样就导致服务器重启之后,“CommandListener”服务没有能够自动启动。
但是却找不到是哪一个部分依赖于这个“WMI Performance Adapter”。
经过逐个排查,确定是添加了对“Microsoft Enterprise Library”的“Microsoft.Practices.EnterpriseLibrary.Caching.dll”的使用导致的。
探求究竟
System.Management.Instrumentation引发的
由于Microsoft.Practices.EnterpriseLibrary.Caching工程中,有对“System.Management.Instrumentation”的引用。
而这个“System.Management.Instrumentation”命名空间提供一些类,提供在规范应用程序管理并通过 WMI 向潜在使用者公开管理信息和事件时必需的类。这样,Microsoft Application Center 或 Microsoft Operations Manager 等使用者就可以轻松地管理您的应用程序,而管理员脚本或其他应用程序(托管应用程序和非托管应用程序)也可以监视和配置您的应用程序。
也就是说,正是因为Microsoft.Practices.EnterpriseLibrary.Caching,所以为服务引入了“WMI Performance Adapter”服务的依赖性。
解决办法:
由于没办法通过Cache自身的配置解除对“WMI Performance Adapter”服务的依赖,我们只能主动给“CommandListener”服务加上相关服务依赖性,这样让我们的服务能够成功自动启动。
通过以下代码,就可以:
Code |
[RunInstaller(true)] public class ProjectInstaller : System.Configuration.Install.Installer { private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; private Verifide.ServiceUtils.ServiceInstallerEx serviceInstaller1; this.serviceInstaller1.ServicesDependedOn = new string[] { "WMI Performance Adapter"}; |
编写者 |
日期 |
关键词 |
<personname w:st="on"><span style="COLOR: gray; FONT-FAMILY: 宋体; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: " times new roman>郑昀</span></personname>@ultrapower |
<chsdate w:st="on" isrocdate="False" islunardate="False" day="13" month="6" year="2005"><span lang="EN-US" style="COLOR: gray; FONT-FAMILY: Arial">2005-6-13</span></chsdate> |
Service C# Cache “WMI Performance Adapter” “Microsoft Enterprise Library” |
相关推荐
WINdows wmi编程 C#实例 里面很清楚的介绍了好几个常见的WMI的查询
修复WMI服务 修复WMI服务 修复WMI服务
C#利用WMI技术可以远程重启,关闭主机,也可以远程操作主机。
c#使用WMI更改IP地址注释写的非常清楚,示例简单,可用性高
如何获取硬件信息(CPU ID,主板信息,硬盘序列,系统信息 ,内存信息,BIOS信息等),非常全,所有WMI Class 都包
c#做的系统监控小程序。 实时监控CPU、内存、硬盘的各种信息。
C#实例 实现WMI连接目标,运行命令与查询状态...此实例完整演示了如何连接135RPC服务,即WMI服务,实现功能: 1、远程获取计算机信息 2、执行命令 3、重启电脑 4、打开进程 5、打开共享SMB 6、连接SMB并实现传输文件等
C#WMI编程(读取各种硬件)源码 功能介绍: WMI读取各种硬件,基本所有的硬件信息访问都有 进程控制 开机启动项管理 网络连接 硬件信息 系统资源 服务 工具 注意: 开发环境为Visual Studio 2010
开发环境:Visual Studio V2010 .NET Framework 4 Client Profile 代码如下:using System;using System.Management;using System.Text.RegularExpressions;using System.Collections.Generic; ...
C#WMI编程(读取各种硬件)源码 功能介绍: WMI读取各种硬件,基本所有的硬件信息访问都有 进程控制 开机启动项管理 网络连接 硬件信息 系统资源 服务 工具 注意: 开发环境为Visual Studio 2010
利用WMI技术获取系统相关信息: 1.硬件配置 2.设备驱动 3.环境变量 4.内存信息 5.网卡信息 6.处理器信息 7.进程信息 8.显卡信息 并能查询WMI各类数据
WMI 的一个实现.zip,用C#语言实现,是学习WMI的好例子
本资源包含了 如何使用c#调用wmi函数 并利用wmi中win32类Win32_NetworkAdapterConfiguration配置静态ip
花血本在网上的一个开源库 ,本人编译后亲测20台清装xp sp2的机器,无问题,win7 和win8 也测试过,无问题。。
这是我自己学习WMI技术时,用C#写的一个利用WMI技术控制并获取本地计算机和远程计算机系统相关信息(操作系统信息、网卡信息、逻辑分析信息等)的一个很好的实例,供大家学习和参考。
c#WMI更改IP修改版,简单实用,注释非常详细
近期公司要让写个远程监控进程的内存和cpu百分比,自己写了个程序,主要功能就是监控多台机器指定进程的cpu占比和内存消耗
通过wmi远程关机,适用于微软操作系统,需要关闭防火墙,开启rpc服务,
C#中用WMI获取服务器信息-A
使用WMI在C#下获取U盘的永久不变的物理序列号