Creating a process in ASP.NET and checking TotalProcessorTime
From: Juerg Staub (juerg.staub@object-soft.ch)
Date: 08/13/02
- Next message: Shane: "Accessing a web service through a firewall"
- Previous message: Radomir: "Re: Execute permissions for bin directory keep reverting"
- Next in thread: Mike Moore: "RE: Creating a process in ASP.NET and checking TotalProcessorTime"
- Reply: Mike Moore: "RE: Creating a process in ASP.NET and checking TotalProcessorTime"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: juerg.staub@object-soft.ch (Juerg Staub) Date: 13 Aug 2002 14:46:28 -0700
Hi,
I am creating a process in a C# class like the following:
code> ProcessStartInfo sti = new ProcessStartInfo();
code> sti.FileName = "c:\\windows\\notepad.exe";
code> sti.CreateNoWindow = true;
code> sti.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
code> this.process = Process.Start(sti);
code> this.process.Exited += new EventHandler(this.processDied);
When I try to get the processor time with
code> TimeSpan ts = this.process.TotalProcessorTime
I receive a System.InvalidOperation exeception. The process is created
as the NETWORK SERVICE user. I tried with impersonate and/or changing
the processModel user to system with no help. The notepad.exe is only
an example. The real process will be a windowless program.
The box is .NET server with IIS6.
Any help appreciated.
Juerg
- Next message: Shane: "Accessing a web service through a firewall"
- Previous message: Radomir: "Re: Execute permissions for bin directory keep reverting"
- Next in thread: Mike Moore: "RE: Creating a process in ASP.NET and checking TotalProcessorTime"
- Reply: Mike Moore: "RE: Creating a process in ASP.NET and checking TotalProcessorTime"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]