473,386 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 1469
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

33
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,...
3
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...
4
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...
0
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...
4
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
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: ...
2
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...
2
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...
0
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...

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.