'param incorrect' error trying to create custom perf category

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ben

    'param incorrect' error trying to create custom perf category

    hi,

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

    PerformanceCoun terCategory.Cre ate(categoryNam e, categoryDesc,
    PerformanceCoun terCategoryType .SingleInstance , ccdc);


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

    System.Componen tModel.Win32Exc eption: The parameter is incorrect
    at System.Diagnost ics.Performance CounterLib.Regi sterFiles(Strin g
    arg0, Boolean unregister)
    at System.Diagnost ics.Performance CounterLib.Regi sterCategory(St ring
    categoryName, PerformanceCoun terCategoryType categoryType, String
    categoryHelp, CounterCreation DataCollection creationData)
    at System.Diagnost ics.Performance CounterCategory .Create(String
    categoryName, String categoryHelp, PerformanceCoun terCategoryType
    categoryType, CounterCreation DataCollection 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!
  • Ben

    #2
    Re: 'param incorrect' error trying to create custom perf category

    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:
    >
    PerformanceCoun terCategory.Cre ate(categoryNam e, categoryDesc,
    PerformanceCoun terCategoryType .SingleInstance , ccdc);
    >
    ...it works ok from another web server, but on a particular one it
    gives this exception:
    >
    System.Componen tModel.Win32Exc eption: The parameter is incorrect
       at System.Diagnost ics.Performance CounterLib.Regi sterFiles(Strin g
    arg0, Boolean unregister)
       at System.Diagnost ics.Performance CounterLib.Regi sterCategory(St ring
    categoryName, PerformanceCoun terCategoryType categoryType, String
    categoryHelp, CounterCreation DataCollection creationData)
       at System.Diagnost ics.Performance CounterCategory .Create(String
    categoryName, String categoryHelp, PerformanceCoun terCategoryType
    categoryType, CounterCreation DataCollection 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.

    Comment

    Working...