hi,
i want to collect information about my asp.net worker process, so i wrote the code below :
Process p = Process.GetCurrentProcess();
foreach (System.Reflection.PropertyInfo prop in p.GetType().GetProperties())
{
Response.Write(prop.Name + "<br>" + prop.GetValue(p, null).ToString());
}
when i run the page i get the following error :
Process must exit before requested information can be determined. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Process must exit before requested information can be determined.
Source Error:
Line 22: {
Line 23:
Line 24: Response.Write(prop.Name + "<br>" + prop.GetValue(p, null).ToString());
Line 25:
Line 26: }
what is the reason for this error and what should i do to get what i want?
thanks inadvance
Serkan Şendur