Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / November 2006

Tip: Looking for answers? Try searching our database.

Performance counter problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dwhite - 27 Nov 2006 22:13 GMT
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
Steve Drake - 28 Nov 2006 09:55 GMT
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.

--
http://stevesdotnetblog.spaces.live.com/

> Our software package works fine under XP but when I run under Vista RC1
> as an administrator I get the following exception:
[quoted text clipped - 27 lines]
> David White
> GSD Telematics
dwhite - 28 Nov 2006 17:17 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.