471,354 Members | 2,077 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

'param incorrect' error trying to create custom perf category

Ben
hi,

i have this line in a web app to create a custom perf category:

PerformanceCounterCategory.Create(categoryName, categoryDesc,
PerformanceCounterCategoryType.SingleInstance, ccdc);
....it works ok from another web server, but on a particular one it
gives this exception:

System.ComponentModel.Win32Exception: The parameter is incorrect
at System.Diagnostics.PerformanceCounterLib.RegisterF iles(String
arg0, Boolean unregister)
at System.Diagnostics.PerformanceCounterLib.RegisterC ategory(String
categoryName, PerformanceCounterCategoryType categoryType, String
categoryHelp, CounterCreationDataCollection creationData)
at System.Diagnostics.PerformanceCounterCategory.Crea te(String
categoryName, String categoryHelp, PerformanceCounterCategoryType
categoryType, CounterCreationDataCollection counterData)
if i try to run the same code on a c# win app on this same server, it
works... just doesn't work from a web app (the app is running under
an administrator user).

anyone encounter this?

thanks!
Aug 5 '08 #1
1 1401
Ben
On Aug 5, 3:50*pm, Ben <benm5...@gmail.comwrote:
hi,

i have this line in a web app to create a custom perf category:

PerformanceCounterCategory.Create(categoryName, categoryDesc,
PerformanceCounterCategoryType.SingleInstance, ccdc);

...it works ok from another web server, but on a particular one it
gives this exception:

System.ComponentModel.Win32Exception: The parameter is incorrect
* *at System.Diagnostics.PerformanceCounterLib.RegisterF iles(String
arg0, Boolean unregister)
* *at System.Diagnostics.PerformanceCounterLib.RegisterC ategory(String
categoryName, PerformanceCounterCategoryType categoryType, String
categoryHelp, CounterCreationDataCollection creationData)
* *at System.Diagnostics.PerformanceCounterCategory.Crea te(String
categoryName, String categoryHelp, PerformanceCounterCategoryType
categoryType, CounterCreationDataCollection counterData)

if i try to run the same code on a c# win app on this same server, it
works... *just doesn't work from a web app (the app is running under
an administrator user).

anyone encounter this?

thanks!
so just creating a new app pool (with same identity and other
settings) helped resolve the issue....very odd.
Aug 6 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

33 posts views Thread by coosa | last post: by
3 posts views Thread by priscilla.jenkins | last post: by
reply views Thread by renateves | last post: by
4 posts views Thread by news.citenet.net | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.