Process metrics are available only when the ASP.NET process model is enabled. When running on versions of IIS 6 or newe

ProcessInfo[] processInfo = ProcessModelInfo.GetHistory(100);

error:

Process metrics are available only when the ASP.NET process model is enabled.  When running on versions of IIS 6 or newer in worker process isolation mode, this feature is not supported.

 

what is the reason for this error?

 

 

As far as I know, it attributes to your IIS. You can check this: http://msdn2.microsoft.com/en-us/library/system.web.processinfo.aspx

If you are using Microsoft Internet Information Services (IIS) 6.0, process metrics returned by the ProcessInfo classes are available only if you are running in IIS 5.0 isolation mode. If you are using IIS 6.0 in worker process isolation mode, the ASP.NET process model is disabled and an HttpException exception is thrown when you access ProcessInfo members.

So if you run IIS under IIS5.0 isolate mode, it can help you out.

 

posted on 2009-07-05 11:37  船长  阅读(278)  评论(0编辑  收藏  举报