How does IPv6 impact web debugging with VS200(58)?

by Klaus Graefensteiner 21. April 2008 02:39

The Quick Answer

IPv6 might break the connection between IE 7 to the local instance of the Visual Studio development web server "webdev.webserver.exe".

The Fix

Un-comment the line "::1    localhost" in the hosts file of your development machine. Have your machine use "    localhost" instead. This time IE 7 connected to the web server.

Neural network enhanced with Photoshop

Figure 1: Neural network enhanced with Photoshop

The Story

I got a new computer with enough horsepower to run Windows Vista 64 Ultimate. I installed the Service Pack 1 release of the operating system. After I moved my "furniture" in (installed all the software), I wanted to test Visual Studio 2005 by running my BlogEngine application locally on my machine. I opened the Visual Studio solution and hit the "Start debugging" button. IE7 opened and I got a message that it is unable to connect to the web server. I tried it a couple of times. Then I tried with Visual Studio 2008 and created a new web site project. The same issue. IE didn't connect to the local web server. Finally I tried Firefox 2.0. To my surprise Firefox was able to connect to the debug web server and successfully render the pages. After searching and posting at the forums at I discovered the solution for my problem.

What I have learned

Windows Vista Ultimate 64 SP1 installs IPv6 (Internet Protocol version 6). The presence of this new protocol seems to break the connectivity between IE7 and the development web server, because of the new routing rules for local connections. When you start debugging a web site in Visual Studio, VS launches Internet Explorer and makes it point to an URL similar to http://localhost:4266/BlogEngine.Web/. The IP address mapping for localhost doesn't get resolved and IE7 can't connect. Removing the IPv6 entry for localhost in the hosts file bypasses this problem.


IP address mappings in the hosts file

Figure 2: IP address mappings in the hosts file

kick it on

Tags: , , , , ,

BlogEngine.NET | Debugging


6/26/2008 9:03:03 AM #


My hosts file has: localhost

and I'm still having the IPv6 problem you described.

If I uninstall IPv6, the VS embedded web server works fine. IF IPv6 is installed it doesn't.


Poo United States |

6/26/2008 1:50:58 PM #


Hi Poo,

do you still have the line "::1    localhost" in the hosts file? If yes, try to put a pound sign in front of it to un-comment it: "#::1    localhost".

Klaus United States |

Comments are closed

About Klaus Graefensteiner

I like the programming of machines.

Add to Google Reader or Homepage

LinkedIn FacebookTwitter View Klaus Graefensteiner's profile on Technorati
Klaus Graefensteiner

Klaus Graefensteiner
works as Developer In Test and is founder of the PowerShell Unit Testing Framework PSUnit. More...

Open Source Projects

PSUnit is a Unit Testing framwork for PowerShell. It is designed for simplicity and hosted by Codeplex.
BlogShell is The tool for lazy developers who like to automate the composition of blog content during the writing of a blog post. It is hosted by CodePlex.



Powered by:

Creative Commons License

© Copyright 2015, Klaus Graefensteiner.

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Theme design:
This blog theme was designed and is copyrighted 2015 by Klaus Graefensteiner

Page rendered at 5/28/2015 2:53:24 PM (PST Pacific Standard Time UTC DST -7)