'param incorrect' error trying to create custom perf category

B

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.RegisterFiles(String
arg0, Boolean unregister)
at System.Diagnostics.PerformanceCounterLib.RegisterCategory(String
categoryName, PerformanceCounterCategoryType categoryType, String
categoryHelp, CounterCreationDataCollection creationData)
at System.Diagnostics.PerformanceCounterCategory.Create(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!
 
B

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.RegisterFiles(String
arg0, Boolean unregister)
   at System.Diagnostics.PerformanceCounterLib.RegisterCategory(String
categoryName, PerformanceCounterCategoryType categoryType, String
categoryHelp, CounterCreationDataCollection creationData)
   at System.Diagnostics.PerformanceCounterCategory.Create(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.
 

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

Similar Threads


Top