ASP.NET Development Server Problems Under Vista

I guess I was bored last night so I decided to upgrade my development system to Vista.  I have been running Windows XP Pro without any real issues but I wanted to start using some of the features of Vista I had only used in my virtual machines.

The upgrade went pretty well with only a handful of driver issues for video, printer and my sound card.

I installed the Visual Studio 2005 updates to run on Vista outlined by Microsoft and Visual Studio seemed to run just fine.    Note that ASP.NET is not installed by default, so you will need to enable it.

I normally use the ASP.NET Development Server for ASP.NET applications for development and testing and move over to IIS for deployment.   The only real problem I faced was hitting Ctrl-F5 in Visual Studio 2005 to run one of my web applications, the server started, Internet Explorer opened but nothing happened.  I waited for several minutes, but nothing.

After searching the web many different ways I found out that Vista implements IPv6 (versus the old IPv4) and browsers may have issues resolving http://localhost.  Since I use both Internet Explorer and Firefox for web development I decided to try just copying the URL the ASP.NET Development Server was using and pasting manually into both browsers and the same result...nothing, no error, nothing.

It turns out others have had this same problem and you can turn off IPv6 in Firefox pretty easily.

Disable IPv6 in Firefox
  1. Type about:config in the address bar and press Enter.
  2. Scroll down until you find network.dns.disableIPv6.
  3. Double-click on it to change its value to true.
  4. Restart Firefox.

After restarting Firefox I pasted the address used by ASP.NET Development Server into the Firefox address bar....and it worked like a charm.  So, it seems IPv6 is the issue.

I spent an hour or so trying to find a similar configuration for Internet Explorer but had no luck.  If a reader finds a setting in IE to disable IPv6 I would like to hear about it so I can update this post.

The solution I did get to work in IE was to disable IPv6 for my system.  I found a great article by the Cable Guy which pointed out what to do.   In short I set the following key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\tcpip6\Parameters\DisabledComponents

to a value of 0xff and restarted the system.  Checking the ASP.NET Development Server URL in the IE address bar displayed my page.

Conclusion

This worked for me but I have reservations about the solution.  What are the side-effects or the future effects of disabling IPv6 which Microsoft includes with Vista.  If the system evolves and I need IPv6 then I will have a different problem.

If someone has a different solution I would like to hear it.  I am not keen on disabling IPv6 but it works and it is not irreversible.  On the plus side, browsing the web seems to be faster.

44 Comments : 10.25.07

Similar Posts

  1. Application_Start not firing and the Global.asax
  2. My Microsoft Vista Development Environment
  3. Time for a Development System Reconfiguration

Feedbacks

 avatar
#1
Charles Assaf
01.08.2008 @ 11:09 PM

Found a more elegant solution for you (don't kick yourself too hard).

Disable IPv6 in your network adapter's properties (you likely wont need it for a couple of years yet, and M$FT should have figured it out by then).

This works for both IE and Firefox (without changing Firefox's config).

 avatar
#2
Rob Bazinet
01.08.2008 @ 11:11 PM

@Charles I tried this and it did not work, I had to do what I documented in my post. I found out disabling IPv6 on the network adapter did not disable for loopback.

Thanks.

 avatar
#3
Saeed Tabrizi
01.19.2008 @ 10:01 AM

Hi

I have same problem too in vs2008 on vista .

I configured my firefox as you say , its working good

But my system , still not working by localhost .

if you find any solution , please tell to me by my email.

 avatar
#4
Rob Bazinet
01.19.2008 @ 12:19 PM

@Saeed This post IS a solution. If you follow it, it works on Vista.

 avatar
#5
portella
02.06.2008 @ 3:23 PM

wow ... Thanks a lot Rob! This was happing to me also ... I tried to disable IPv6 in network adapter’s properties as Charles suggested without success ...

Thanks!

 avatar
#6
Rob Bazinet
02.06.2008 @ 3:36 PM

@Portella Great, glad I could help. It just shows Vista is in need of a service pack or two.

 avatar
#7
marko
02.09.2008 @ 3:54 PM

what about windows xp pro, i have wrong ports in IE and in ASP.NET development server when i load local webpage..

Visual studio 2008 pro..

 avatar
#8
Rob Bazinet
02.10.2008 @ 8:35 PM

@Marko Not sure about XP Pro, I have never see issues with VS 2008 and XP Pro.

 avatar
#9
Manni
02.15.2008 @ 5:38 AM

Wow. Interesting.

I'd be curious to see what Vista's hosts file looks like, though. There should be some IP attached to localhost in there.

 avatar
#10
Saad Siddique
02.29.2008 @ 10:22 AM

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\tcpip6\Parameters\DisabledComponents

i did not find the Disables Components in my Parameters. I'm still unable to solve my problem in IE, however, it's working fine in FireFox now

 avatar
#11
nats
03.03.2008 @ 1:52 PM

HI!

I have Vista Home Premium too. I still could not make the VSW 2008 work. I have the same problem as Siddique. I don't see any DisabledComponents in my Registry.

Do u know why?

Thanks

 avatar
#12
michal
03.06.2008 @ 1:44 PM

on my vista and vs2008 i only have to change in IE from http://localhost:portnum/SomePage.aspx to http://127.0.0.1:portnum/SomePage.aspx and everything works

[...] Ein Leidensgenosse [...]

 avatar
#14
michal
03.15.2008 @ 3:09 PM

I found even better way, just comment int system32/drivers/etc/ line containing "[:::1] localhost"

 avatar
#15
Rob Bazinet
03.15.2008 @ 5:39 PM

@Michal Great info, I will give it a try on my next Vista install.

 avatar
#16
Sabith
03.23.2008 @ 8:25 AM

thanx Rob Bazinet and michel,better method is comment int system32/drivers/etc/host line containing :::1 localhost

 avatar
#17
Mikael Nygaard
03.24.2008 @ 5:32 PM

#14 is the best solution.

Comment out the line in the host file with where ::1 is mapped to localhost. Worked straight away.

 avatar
#18
Edson Bassani
04.03.2008 @ 10:03 PM

Fantastic! It saved me a lot of work!

Thanks so much!

 avatar
#19
Rob Bazinet
04.03.2008 @ 10:41 PM

@Edson Great to hear. Helping out another person makes having a blog worth it.

 avatar
#20
Richard vN
04.21.2008 @ 5:13 PM

Ad an extra : before the '::1' in the line where ::1 is mapped to localhost. Worked straight away.

It Should be :::1 instead of ::1. A little 'bug' in Vista.

--------------------------------------------------------------------------------

 avatar
#21
M.S. Babaei
04.30.2008 @ 10:49 AM

I have Vista SP1

and VS2008

and it works...

and I'm testing

Vista (withou SP) with VS2005 and VS2008

and it works fine!

I think it's depending on Hardware

because one of my friends has the same problem!

 avatar
#22
D-Man
05.02.2008 @ 4:16 PM

Thanks Richard vN.

I was one of the eager adopdters of Vista as I wanted to have some hands-on experience of dev'ing for the OS before it took root and I've had this problem for years.

The simplicity of your solution shows how little I know about IPv6 but like Rob, I was never comfortable with the wholesale disabling of it either.

The amazing thing is that my current installation of Vista was installed from a disc with SP1 slipstreamed in, suggesting that this 'bug' seems to have slipped by M$.

admin avatar
#23
The Admin
05.02.2008 @ 4:21 PM

@D-Man I just installed an additional Vista system here with SP1 slipped as you did, I had the same problem again. I really like the solution of simply adding an additional ':' in the hosts file, very elegant for sure.

 avatar
#24
steve
05.05.2008 @ 5:28 PM

thanks a lot you solved my problem

 avatar
#25
wael
05.31.2008 @ 6:36 AM

:::1 instead of ::1

works for me for internet explorer

:-)

 avatar
#26
Michael Paul
07.07.2008 @ 2:58 AM

Thank you so much! Worked for me, too. To make things perfectly clear, you want to go to C:\WINDOWS\system32\drivers\etc and edit the "hosts" file with Notepad. In my case (running Windows XP Media Center Edition), I commented it out by using a pound sign.

I replaced

127.0.0.1 localhost

with

#127.0.0.1 localhost

 avatar
#27
Zaibot
07.22.2008 @ 11:44 PM

I found another little work around that MUCH more usefull.

Download Fiddler and set it up as proxy.

Turn off that Firefox doesn’t use the proxy for localhost and 127.0.0.1 ofcourse. And if you have trouble reaching the server, setup a custom startpage that’s pointing to 127.0.0.1 instead of localhost. :)

This way you can monitor your traffic with the development server and it also gets rid of the problem that it’s slow. ;-)

Greetz

 avatar
#28
Andrew
08.11.2008 @ 8:11 PM

for me, I found that the port that the ASP.net dev server was starting on was different to the one that the browser was trying to connect to.

make sure you check the settings of your dev server (right click the satellite icon -> properties) and check that the port # is the same as the one that gets appended to your url

 avatar
#29
Zalmoxis
08.27.2008 @ 7:12 AM

Andrew, for me this is the exact situation. And I guess there is a bug in VS 2008 because it is trying to start on one port and sees that it is unavailable and then start the instance of the webserver on another port.

 avatar
#30
Chan
08.27.2008 @ 8:11 AM

Thank you so much guy!

:oD

 avatar
#31
Fer
08.29.2008 @ 2:41 PM

Thanks guy you really saved my life

 avatar
#32
Matt
09.18.2008 @ 3:36 PM

You can disable IPV6 against localhost by editing the host file:

C:\Windows\System32\drivers\etc\hosts

::1 localhost

Add a # in front of this line to make it a comment. Restart your PC. Good to go.

 avatar
#33
cvg
09.18.2008 @ 5:05 PM

Thank you so much guy!

localhost <> 127.0.0.1 :)

 avatar
#34
PerW
09.25.2008 @ 3:34 PM

:::1 instead of ::1

works for me and for internet explorer

:-)

Thanks a lot!

 avatar
#35
Donal
09.28.2008 @ 10:25 AM

rob,

Thanks Very Much for solving my problem

Donal O Sullivan

 avatar
#36
David
10.14.2008 @ 4:15 PM

I have the similar issue and after testing these solutions I still had the problem. When I configured IIS I had named the Binding for port 80 (default web site) with the fully qualified name for the machine (machine.company.com). I solved the issue by adding a second binding rule to port 80 with host name of localhost.

 avatar
#37
J
10.15.2008 @ 1:49 AM

Excelente solución la de agregar : , agradezco mucho su ayuda!

 avatar
#38
José Pérez
11.07.2008 @ 1:41 PM

Oh thaks guys, that change works for me ;)

Saludos

 avatar
#39
Patrik
11.27.2008 @ 2:48 PM

Thanks for this ... strange that this has not been corrected by MS

» Trackbacks & Pingbacks

  1. Pingback from Data Access and Data Binding Sample Application Setup - Ryan Smith

  2. ASP.NET Developer Server and Vista

    ASP.NET Developer Server and Vista — April 12, 2008 4:57 PM
  3. I have wanted to be a Windows Vista user and developer since before it was released, but there always seemed like something didn't work or some application I used kept crashing. The pure pain of the performance of Vista alone was not worth the &quot;upgrade&quot;

    Back in the Vista Saddle Again — April 29, 2008 3:29 PM
  4. Hola amigos, pues resulta que probando una aplicación Web en el Visual Studio 2008 no me cargaba, en

  5. Pingback from Cidesoft.Blogs() » Blog Archive » Problema con ASP.NET Web Development Server en Vista (Home Premium)

Trackback link for this post:
http://accidentaltechnologist.com/trackback.ashx?id=178

Leave a Comment