calculate bytes sent/recieved by web browser(IE)

anmoldubey

New member
Joined
Jan 14, 2011
Messages
3
Programming Experience
Beginner
Hi All,

I want to build a small application to calculate the total data sent/recieved by a webbrowser(IE) while opening a webpage. Please tell me how to start this.

ps: i am new to c# and vb.net ,so would request you to reply in a bit discriptive way
 
You can use this and find which NetworkInterface is used: NetworkInterface.GetAllNetworkInterfaces Method (System.Net.NetworkInformation)
When you have done that you can call its GetIPv4Statistics method and read BytesReceived property before and after the webpage load and calculate total bytes received during this time.

on running the below code::
public static void DisplayDnsConfiguration()
{
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces();
foreach (NetworkInterface adapter in adapters)
{
IPInterfaceProperties properties = adapter.GetIPProperties();
Console.WriteLine(adapter.Description);
Console.WriteLine(" DNS suffix .............................. : {0}",
properties.DnsSuffix);
Console.WriteLine(" DNS enabled ............................. : {0}",
properties.IsDnsEnabled);
Console.WriteLine(" Dynamically configured DNS .............. : {0}",
properties.IsDynamicDnsEnabled);
}
Console.WriteLine();
}



im getting the below output,
please tell me which one is the correct nework interface

SSL Network Tunneling - Packet Scheduler Miniport
DNS suffix .............................. :
DNS enabled ............................. : False
Dynamically configured DNS .............. : True
NVIDIA nForce Networking Controller - Packet Scheduler Miniport
DNS suffix .............................. : ######
DNS enabled ............................. : False
Dynamically configured DNS .............. : True
MS TCP Loopback interface
DNS suffix .............................. :
DNS enabled ............................. : False
Dynamically configured DNS .............. : True
 
This is a VB.NET forum, y'know.

I would think it's the Nvidia one.
 
It's not very reliable though, since that will measure all network receive traffic going on at the time. But if you just want to know and don't have other receive traffic it should suffice.
 
It's not very reliable though, since that will measure all network receive traffic going on at the time. But if you just want to know and don't have other receive traffic it should suffice.

can you suggest me how to get data only for specific webpage and not for other network activities.
 
Back
Top