C# .NET - Host File - Asked By Vinod Srinivasan on 12-Jan-10 12:53 PM

What is host file. What is the use of host file.

Open it up with a text editor and it will be obvious - Robbe Morris replied to Vinod Srinivasan on 12-Jan-10 01:19 PM

It gives the local pc a way to map ip addressed to domain names.  This can override dns settings from a central server.

Hosts File - mv ark replied to Vinod Srinivasan on 14-Jan-10 12:35 AM

This Hosts file contains the mappings of IP addresses to host names. You can use this file to block sites. Add the URL of the website you want to block to the Windows HOSTS file and set it to a dummy address (127.0.0.1). For instance, you can block  IFRAME based ads using this technique - http://mvark.blogspot.com/2007/02/how-to-block-iframe-based-ads.html

The file is present at this path: Windows\System32\drivers\etc