I use Visual Studio 2013 with Windows Azure SDK 2.3.
Out of nowhere, after clicking
Start without Debugging, my solution took awhile to start, then an error popped up that said that
ClientPerfCountersInstaller.exe stopped working. I clicked the
Send Information button to send the error to MS, then it exited. "That's weird," I thought. I closed VS, reopened, and tried again. Same thing. Restarted computer, reopened VS, but now, it just hangs while starting the solution (with or without debugging). Azure Compute and Storage Emulators both get started (I can see in the system tray), but nothing else happens. I eventually get the "this is taking longer than expected" message from VS.
I tried uninstalling Windows Azure SDK 2.3, then reinstalling it. That didn't work.
I looked in Windows Event Viewer and noticed the following four errors every time I try to start my solution:
Application: ClientPerfCountersInstaller.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.ComponentModel.Win32Exception Stack: at System.Diagnostics.PerformanceCounterLib.RegisterFiles(System.String, Boolean) at System.Diagnostics.PerformanceCounterCategory.Delete(System.String)
at ClientPerfCountersInstaller.CounterInstaller.ReadConfigAndInstallCounters() at ClientPerfCountersInstaller.CounterInstaller.Main(System.String)
Faulting application name: ClientPerfCountersInstaller.exe, version: 1.0.5287.0, time stamp: 0x533b317f Faulting module name: KERNELBASE.dll, version: 6.1.7601.18409, time stamp: 0x5315a05a Exception code: 0xe0434352 Fault offset: 0x000000000000940d Faulting process id: 0x1918 Faulting application start time: 0x01cf9c5d685efbcd Faulting application path: C:\Path-To-Solution\Dealers.Web.WindowsAzure.Local\csx\Debug\roles\Dealers.Web\approot\bin\Microsoft.WindowsAzure.Caching\ClientPerfCountersInstaller.exe Faulting module path: C:\Windows\system32\KERNELBASE.dll Report Id: a64bfba7-0850-11e4-bd03-b8ca3ac71182
The performance strings in the Performance registry value is corrupted when process Performance extension counter provider. The BaseIndex value from the Performance registry is the first DWORD in the Data section, LastCounter value is the second DWORD in the Data section, and LastHelp value is the third DWORD in the Data section.
Unloading the performance counter strings for service windows azure caching:client (windows azure caching:client) failed. The first DWORD in the Data section contains the error code.
How did this happen? Does it sound like a file or entry or something just got randomly corrupted?
After Googling, I started to find some articles about rebuilding performance counters. It seems that others have experienced these counters getting corrupted.
This article from MS gives all kinds of detailed information about rebuilding performance counters. I didn't want to do the entire manual process, so I just tried rebuilding all counters with the
lodctr /R command first.
I went to Run and typed
cmd to open a Command Prompt, then tried the
lodctr /R command. It said it rebuilt successfully, but in the Event Viewer, two errors appeared, and one was specifically that it couldn't rebuild Windows Azure's counters.
But then I realized I hadn't opened the Command Prompt as an Administrator, as the article instructed. After doing that, I tried the command again, and no errors appeared in the Event Viewer.
And finally, my solutions would run again, both with and without debugging. Whew! Hope this helps someone else.
User contributions licensed under CC BY-SA 3.0