473,586 Members | 2,754 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

'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:

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!
Aug 5 '08 #1
1 1487
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:

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.
Aug 6 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

33
4756
by: coosa | last post by:
I have a table: ---------------------------------------------------- CREATE TABLE CATEGORY ( CATEGORY_ID INTEGER IDENTITY(1,1) NOT NULL, CATEGORY_NAME VARCHAR(40) NOT NULL, PARENT_CATEGORY_ID INTEGER, CATEGORY_ICON IMAGE, DEPTH INTEGER,
3
4795
by: priscilla.jenkins | last post by:
Alright, I'm really new to SQL and VBA and all this, so I might be completely off course...but just tell me. I know C and Assembly, but that doesn't help me much here. I'm trying to create a module that creates 5 queries (that a report is based on) based on a table that the user defines. My tables are named by date (not my choice), for...
4
3398
by: Peter | last post by:
Hello, Thanks for reviewing my question. I am just starting out create a custom control following the KB example "Create a Data Bound ListView Control". I am receiving a syntax error on the following: (43): No overload for method 'EditorAttribute' takes '1' arguments (43): No overload for method 'GetType' takes '1' arguments // <<...
0
1661
by: renateves | last post by:
My problem is that i have a xml file that is convert into a table (by xsl) in a aspx file, and in vb code i want to get and put some values to the table. Is the code: ASPX FILE <Get the table with the values from the xml file> ..... <asp:Xml id="myXml" DocumentSource="XMLCat.xml"
4
5229
by: news.citenet.net | last post by:
I keep getting the following error message after my web site running 2 or 3 days I share one folder with about 200 domain names Any one can help? --------------------------------------------------------------------------------
0
6076
by: jammendolia | last post by:
Hello all, I am having an intermittent exception occur when writing the the eventlog from a windows service application written in c#, running on a Win2k SP4 server. Here's the code: void writeToEventLog(string msg, bool error) {
2
12193
by: Seguros Catatumbo | last post by:
Hello guys, i am trying to port my custom asp 3.0 error page to asp.net. I want to disable debugging in my asp.net projects but i want to show the users a pretty page but that page should send me an email with the details of the error. On classic asp i just went to iis and mapped the 500 error code to error.asp, which does this: set...
2
19443
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's...
0
2897
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's...
0
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8200
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7954
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8215
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.