Name

ProcessModelInfo

Synopsis

ASP.NET includes automated features for restarting a process when memory leaks or crashes occur. This class allows you to retrieve information about how the ASP.NET worker process is performing, along with the history of approximately the last 100 process restarts (a process restart may be in response to an unrecoverble error, blocked thread, or just automatic maintaince when a certain time or memory threshold is reached, according to machine.config settings). This gives you a basic idea about the health of your web application and the ASP.NET service.

You can use the static (shared) GetCurrentProcessInfo() method to retrieve a ProcessInfo object representing the current process. You can also use the static GetHistory() method and supply the number of ProcessInfo objects that you want as an argument. The method will return an array of ProcessInfo objects, starting with the most recent (current) process.

Public Class ProcessModelInfo
                  ' Public Constructors
   Public Sub New() 
' Public Shared Methods
   Public Shared Function GetCurrentProcessInfo(
        ) As ProcessInfo  
   Public Shared Function GetHistory(
        ByVal numRecords As Integer) As ProcessInfo()  
End Class

Get ASP.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.