views:

45

answers:

0

Our customer has a HTTP Remoting endpoint with a framework method that attempts to find out the name of the current running process. In calling System.Diagnostics.Process.ProcessName it intermittently gets into this error condition in some of their Windows 2003 servers.

Error Message : System.InvalidOperationException: Couldn't get process information from remote machine. ---> System.ComponentModel.Win32Exception: Access is denied at System.Diagnostics.PerformanceMonitor.GetData(String item) at System.Diagnostics.PerformanceCounterLib.GetPerformanceData(String item) at System.Diagnostics.PerformanceCounterLib.get_CategoryTable() at System.Diagnostics.PerformanceCounterLib.GetPerformanceData(String[] categories, Int32[] categoryIndexes) at System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLib library)
--- End of inner exception stack trace --- at System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLib library) at System.Diagnostics.NtProcessManager.GetProcessInfos(String machineName, Boolean isRemoteMachine) at System.Diagnostics.ProcessManager.GetProcessInfos(String machineName) at System.Diagnostics.Process.EnsureState(State state) at System.Diagnostics.Process.get_ProcessName()

It seems that .NET 1.1 Process code makes a “peek” into performance counters and that attempt may hit a permission error. Now, the worker process service account that runs this endpoint is included in the Performance Monitor Users group, which is what is documented as necessary in order to access the performance counters.

There are other older Windows servers that do not seem to have this problem and we observe the service account is also included into the Performance Log Users group. This is just an observation and we’re not ready to conclude this is a positive relation here, as we so far do not see any reason why membership with Performance Log Users is supposed to be necessary. Has anybody experience this type of occasional error before?