Getting the IE9 Beta to Play Well with Visual Studio 2010
I’ve been playing with IE9 quite a bit lately and really like what I’m seeing in the browser. It’s fast, standards compliant (from what I’ve seen so far anyway), sleek and leaves a lot of room to display web content. However, I’ve been running into problems with “page not found” errors when trying to load ASP.NET or Silverlight web pages from Visual Studio 2010. I’ve also seen calls to web services fail sporadically when the calls are made directly from the browser (AJAX or Silverlight). I don’t have the problem at all with other browsers so I knew it must be related to the IE9 beta.
After doing a little searching I came across a bug reported on Microsoft’s Connect site. There’s a “Workaround” tab that provides some simple instructions for fixing the issue. In sum, you need to remove a comment from the localhost line in the hosts file on your system (located at C:\Windows\System32\drivers\etc). Once I did that everything started working perfectly and I don’t get “page not found” errors anymore.