ProcessInfo Class

Provides information on processes currently executing.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

public class ProcessInfo
public class ProcessInfo
public class ProcessInfo

This class returns information about ASP.NET worker processes that are running under the ASP.NET process model. Objects of this type are returned by the static methods ProcessModelInfo.GetCurrentProcessInfo and ProcessModelInfo.GetHistory. These methods are the only useful ways to create an initialized object.

The following code example demonstrates using the Age, PeakMemoryUsed, ProcessID, RequestCount, ShutdownReason, StartTime and Status properties of the ProcessInfo class. The example displays a LinkButton. When the LinkButton is clicked, the current process information is displayed.

<%@ Page language="c#" AutoEventWireup="false" %>

    <SCRIPT language="c#" runat="server">     
      void GetProcessInfo(Object sender, EventArgs e) 
        ProcessInfo pi;

        // Get the current process information.
        pi = ProcessModelInfo.GetCurrentProcessInfo();

        Literal1.Text = "<p>Age: " + pi.Age + "</p>";
        Literal1.Text += "<p>PeakMemoryUsed: " + pi.PeakMemoryUsed + "</p>";
        Literal1.Text += "<p>ProcessID: " + pi.ProcessID + "</p>";
        Literal1.Text += "<p>RequestCount: " + pi.RequestCount + "</p>";
        Literal1.Text += "<p>ShutdownReason: " + pi.ShutdownReason + "</p>";
        Literal1.Text += "<p>StartTime: " + pi.StartTime + "</p>";
        Literal1.Text += "<p>Status: " + pi.Status + "</p>";
    <FORM rm id=WebForm1 method=post runat="server">
      <asp:button id=Button1 OnClick="GetProcessInfo" runat="server" Text="Get Process Info"></asp:button>
      <asp:Literal id=Literal1 runat="server"></asp:Literal>

  • AspNetHostingPermission  for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
  • AspNetHostingPermission  for operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions