When we are running the application, it will show like this.
When IE9 tries to go to localhost it uses IPv6, and the ASP.NET Development Server is IPv4 only and so nothing loads and we get the error.
Login in administrator mode and open hosts file in notepad(C:WindowsSystem32driversetchosts).
Remove the hash from the line which has 127.0.0.1 in it and save.
This will cause Windows to resolve localhost to IPv4 first (you can confirm by pinging localhost) which means that IE9 will do the same and now it just works every time.