title: How to measure a Website Bandwidth (Upload+Download) in MB using C#/VB.Net programmatically?
body: <p>Hope that everybody is fine here.</p>
  
  <p>I am writing a <strong>windows service</strong> in <strong>C#/VB.Net</strong> that aims at <strong>measuring bandwidth consumption</strong> for all WebSites on <strong>localhost</strong> and store their statistics for upload , download etc on local/remote database. </p>
  
  <p>Target Platforms include only <strong>Windows Server 2003, 2003 R2, 2008 and 2008 R2.</strong></p>
  
  <p>I have searched a bit on this thing and found the following:</p>
  
  <ol>
  <li>Using <strong>SNMP mgmtapi.dll</strong> which is found in Windows 2003</li>
  <li>Using a <strong>custom Network Driver</strong> to collect statistics.</li>
  </ol>
  
  <p>Please guide on the most appropriate ,<strong>secure</strong> and effective methodology/technique or set of such techniques which can be used to measure the bandwidth consumption for each different website. </p>
  
  <p>Please also share any <strong>code</strong> in this regard.</p>
  
  <p>Regards</p>
  
  <p>Steve</p>