1

I want to know the bandwidth consumption by any running application . We can see this in resource monitor Network Tab where the Network Activity shows it by columns Image , PID , Address , Send ,Receive and Total(B/sec) .
Exactly the same i want this in my c# program.

What if i want to get only one application network consumption information.

  • 1
    [Try this](http://stackoverflow.com/a/442459/815938) – kennyzx Jan 13 '15 at 09:49
  • I get the follwoing error as Instance 'ConsoleApplication3[51336]' does not exist in the specified Category. – MANISH JAIN Jan 13 '15 at 10:04
  • OK. Post the code and tell us more details about the error – kennyzx Jan 13 '15 at 10:06
  • I have tried with the same code that you provide in the link and run this in console application and as the console application is not using any network ... so that the error is generated – MANISH JAIN Jan 13 '15 at 10:12
  • Yes, that is the cause. So I think you should try-catch your code in case it does not use any network resource. If you query the performance counter during downloading something, you should get the desired result. Refer to the two links provided at the end of that answer, I have tested them. – kennyzx Jan 13 '15 at 12:46
  • Oh, BTW, I had to set the target .net version as 3.5 or 2.0. The exception is thrown for v4.0 or higher. – kennyzx Jan 13 '15 at 13:31
  • Possible duplicate of [Calculating Bandwidth](https://stackoverflow.com/questions/442409/calculating-bandwidth) – pmcilreavy Jan 09 '18 at 21:23

0 Answers0