ASP.NET Development Server is not working with IPV6


When you use Visual Studio 2008 on vista ( or windows 2008) machine, when you try to run your project by using Visual Studio asp.net development server, you may experience "Page can not be displayed" or similar error messages and as a result of this, you may unable to access your web application to debug.Basically this could be the fact that ASP.NET development server has some problems running with IPV6. 

 

Symptoms:

When you run your project inside visual studio 2008, Visual Studio hosts this application in ASP.NET development server (it is different than IIS). When you run your application, if you see "page can not be displayed",

-if you ping localhost in command prompt ,if you get similar syntax like below:

Reply from ::1: time=2ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms

-if you open command prompt and type netstat -ano and result of this command, if you see that webdev executable listens your application port

with following syntax:

127.0.0.1:[Port Number]

 

That shows that, webdev executable listens ipv4

 

Solution:

-Disable ipV6

How do I disable IPv6 in Windows Vista and Windows Server 2008?

A.

Unlike Windows XP and Windows Server 2003, IPv6 in Windows Vista and Windows Server 2008 cannot be uninstalled. However, you can disable IPv6 in Windows Vista and Windows Server 2008 by doing one of the following:

.

In the Network Connections folder, obtain properties on all of your connections and adapters and clear the check box next to the Internet Protocol version 6 (TCP/IPv6) component in the list under This connection uses the following items.

This method disables IPv6 on your LAN interfaces and connections, but does not disable IPv6 on tunnel interfaces or the IPv6 loopback interface.

.

Add the following registry value (DWORD type) set to 0xFFFFFFFF:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\DisabledComponents

This method disables IPv6 on all your LAN interfaces, connections, and tunnel interfaces but does not disable the IPv6 loopback interface. You must restart the computer for this registry value to take effect.

For additional information about the DisabledComponents registry value, see Configuring IPv6 with Windows Vista.

If you disable IPv6, you will not be able to use Windows Meeting Space or any application that relies on the Windows Peer-to-Peer Networking platform or the Teredo transition technology.

 

http://www.microsoft.com/technet/network/ipv6/ipv6faq.mspx

 

Or as a second solution, you can edit your host file like below:

-Go to C:\Windows\System32\drivers\etc

-Open command prompt  and run notepad as administrator and open hosts file

127.0.0.1              localhost

 

-Save this file

-ping localhost and see response

-Run your project again.

 

I hope this helps

 

Many Thanks

 

Kagan Arca


Skip to main content