Any help would be appreciated. Thanks in advance.
System.NotSupportedException : Feature is not supported for remote machines.
[Flags=1]
RemoteStackTrace:
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean
throwIfExited)
at System.Diagnostics.Process.GetProcessTimes()
at System.Diagnostics.Process.get_TotalProcessorTime()
at MyProduct.RequestHandlers.ProcessInfoHandler.execute() in
C:\sandbox\MyProduct\Proces.cs:line 86
using System;
using System.Diagnostics;
namespace TestProcess
{
class Program
{
static void Main(string[] args)
{
try
{
foreach (Process process in Process.GetProcesses("x.x.x.x"))
{
Console.WriteLine(process.TotalProcessorTime);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
Console.WriteLine(ex.StackTrace);
}
}
}
}
The point is that someone somewhere made a decision, for whatever reason, to
not support that feature for remote machines.
Now, as to establishing the who, the why and the wherefores of the decision,
you've probably got more chance of winning the lottery.
"Joe K" <j...@nospamplease.com> wrote in message
news:ON0n4rfJ...@TK2MSFTNGP02.phx.gbl...
Below is a rough cut of what works and does not work remotely.
ProcessName - OK
Id - OK
MachineName - OK
BasePriority - OK
ExitCode failed Feature is not supported for remote machines.
ExitTime failed Feature is not supported for remote machines.
Handle failed Feature is not supported for remote machines.
HandleCount - OK
HasExited failed Feature is not supported for remote machines.
MainModule failed Feature is not supported for remote machines.
MainWindowHandle failed Feature is not supported for remote machines.
MaxWorkingSet failed Feature is not supported for remote machines.
MinWorkingSet failed Feature is not supported for remote machines.
Modules failed Feature is not supported for remote machines.
NonpagedSystemMemorySize64 - OK
PagedMemorySize64 - OK
PagedSystemMemorySize64 - OK
PeakPagedMemorySize64 - OK
PeakVirtualMemorySize64 - OK
PeakWorkingSet64 - OK
PriorityBoostEnabled failed Feature is not supported for remote machines.
PriorityClass failed Feature is not supported for remote machines.
PrivateMemorySize64 - OK
PrivilegedProcessorTime failed Feature is not supported for remote
machines.
ProcessorAffinity failed Feature is not supported for remote machines.
Responding failed Feature is not supported for remote machines.
SessionId - OK
StandardError failed StandardError has not been redirected.
StandardInput failed StandardIn has not been redirected.
StandardOutput failed StandardOut has not been redirected or the process
hasn't started yet.
StartInfo System.Diagnostics.ProcessStartInfo
StartTime failed Feature is not supported for remote machines.
SynchronizingObject
TotalProcessorTime failed Feature is not supported for remote machines.
UserProcessorTime failed Feature is not supported for remote machines.
VirtualMemorySize64 - OK
WorkingSet64 - OK