Performance counter problem

D

dwhite

Our software package works fine under XP but when I run under Vista RC1
as an administrator I get the following exception:

Exception has been thrown by the target of an invocation. --->
System.Security.SecurityException: Requested registry access is not
allowed.\r\n at
System.ThrowHelper.ThrowSecurityException(ExceptionResource
resource)\r\n at Microsoft.Win32.RegistryKey.OpenSubKey(String name,
Boolean writable)\r\n at
System.Diagnostics.PerformanceCounterLib.CreateRegistryEntry(String
categoryName, PerformanceCounterCategoryType categoryType,
CounterCreationDataCollection creationData, Boolean& iniRegistered)\r\n
at System.Diagnostics.PerformanceCounterLib.RegisterCategory(String
categoryName, PerformanceCounterCategoryType categoryType, String
categoryHelp, CounterCreationDataCollection creationData)\r\n at
System.Diagnostics.PerformanceCounterCategory.Create(String
categoryName, String categoryHelp, PerformanceCounterCategoryType
categoryType, CounterCreationDataCollection counterData)\r\n at
GSD.Telematics.SenseNetAPI.SenseNet.SetUpPerformanceTracking()\r\n at
GSD.Telematics.SenseNetAPI.SenseNet..ctor()\r\nThe Zone of the assembly
that failed was:\r\nMyComputer\r\n --- End of inner exception stack
trace ---

At this spot in the code we are trying to create a performance counter
group with performance counters inside it. I can not seem to find any
information anywhere on what has changed in Vista to cause this. I am
running as an administrator on the machine and am in the Performce
Counter groups in Vista. Any thoughts or pointers would be appreciated.

David White
GSD Telematics
 
S

Steve Drake

Could this be UAC?

If you login as Admin in vista any process you create runs without your
admin rights, unless they are 'told' too.

We use Perf Counters in our APP but we creat them as part of the installer.
 
D

dwhite

So I got bit by UAC huh? Obviously one solution is to install them
upfront (which I think is good anyways) but in the mean time do I just
tell it to run under Administrator? Thanks for the help

David White
GSD Telematics
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top