Power BI

Content by Charles Sterling

System Diagnostics Bug under Windows Server 2003

Just filed a bug on the MSDN site for System.Diagnostics and figured i would post it here too:

When attempting to use System.Diagnostics.Process.Responding to enquire on a process’s responsiveness an ‘Access is Denied’ Exception is raised on Windows Server 2003.

On deeper investigation, the standard user in Win2003 needs to be in ‘Performance Monitor Users’ for them to work.

With RegMon, we have discovered that Process.Responding eventually calls to PerformanceMonitor.GetData() which tried to access the
following ACL guarded registry key: HKLM\Software\Microsoft\Windows NT\CurrentVersion\Perflib

The RegQueryValueEx() trying to access this key caused the ‘Access is Denied’ Exception.
The key and its sub-tree are only guard in Win2003 but not in XP. Even a LUA user can read that key and sub-tree.


Steps to reproduce:

Create an application with the following code and run on Windows XP and Windows Server 2003

Dim myProcess As Process = Nothing
myProcess = Process.Start(“NotePad.exe”)


Note you will get an error on Windows Server 2003 but not XP