Performance Counter not working  
Author Message
mbcatabas





PostPosted: Mon Apr 24 14:50:32 CDT 2006 Top

Dotnet >> Performance Counter not working Hello,

I wrote an application in c# .net 2.0. The application monitors the network
speed of a networkinterface. If I install the application at another pc with
the .net framework installed, the application won't run. The performance
counter can initialize itself but the value of bytes recieved for example is
always 0.

What should I do? Thanks

DotNet420  
 
 
Dave





PostPosted: Mon Apr 24 14:50:32 CDT 2006 Top

Dotnet >> Performance Counter not working Do you have administrative access to the machine? If you're creating a
custom counter you need to have administrative access to the machine.

Can you post the code you're using for this?

Dave

 
 
DHarry





PostPosted: Tue Apr 25 03:29:02 CDT 2006 Top

Dotnet >> Performance Counter not working PCounter = new PerformanceCounter("Network Interface", "Bytes
Received/sec",networkInterfaceName);

To get the values I use the following every second:

PCounter.NextSample().RawValue;

But the last statement is always 0, if i install the application at another
pc. I checked if the other person has administrative access, and he also had.