Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
612 views
in Technique[技术] by (71.8m points)

c# - Cannot load Counter Name data because an invalid index -Exception

I am using C# and WPF - Operating System is windows 7 Professional and Visual Studio 2012, SQL Server 2012.

I used Devexpress Grid in wpf. I want to bind it to database using ADO.Net Server mode. I selected "Items Source Wizard" Option to do this binding but it generated following Exception:

InvalidOperationException: Cannot load Counter Name data because an invalid index '' was read from the registry.

What does this exception mean?

Can you please help me to resolve this issue.

Thanks, Annie.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Just had that message related to Microsoft Dynamics CRM updates not installing and the marked answer for this post helped greatly:

Click Start, type cmd right click cmd.exe, and select Run as administrator. At the prompt, type lodctr /r and press ENTER.

Apparently, Windows keeps some counters cache in the registry at HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionPerflib09 Counter+Help. If this cache becomes corrupted (has blank lines), you get the above errors - and lodctr /r rebuilds that cache.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...