`
阿尔萨斯
  • 浏览: 4184075 次
社区版块
存档分类
最新评论

[C#]服务为何会依赖于WMI Performance Adapter服务

 
阅读更多
<iframe align="center" marginwidth="0" marginheight="0" src="http://www.zealware.com/csdnblog336280.html" frameborder="0" width="336" scrolling="no" height="280"></iframe>

[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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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 ServiceCommandListener”在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”




分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics