I recently upgraded to Windows 7 and found that running a website using the ASP.NET Development Server on Visual Studio 2008 is really slow!
Having tried altering a few settings and playing with my anit-virus I turned to search and it lead me to reading this:
“It turns out that the slowness is caused by an IPv6 issue with DNS and can easily be resolved by turning IPv6 support off in Firefox while doing localhost testing. To make the change, type about:config in the address bar, locate the network.dns.disableIPv6 setting and double-click on it to set it to true. This does the trick for the Firefox localhost issue on Vista and everything is running fast again.” (Dan Wahlin)
I decided not to follow Dan’s advice because I need to test on other browsers (e.g. Chrome). As this problem stems from DNS resolution with IPv6 I instead fixed the problem by editing the hosts file.
It’s a straight-forward task and only takes a minute…
- Open Notepad in administrator mode (right click “Run as administrator)
- Navigate to “WINDOWSSystem32driversetc”
- Open “hosts”
- Uncomment the line “# 127.0.0.1 localhost” but removing the # from the line
- Save the file
Your hosts file should look similar to this now:
# localhost name resolution is handled within DNS itself.
# ::1 localhost
Hope this helps.