Click here to Skip to main content
Click here to Skip to main content
Technical Blog

Is Your ASP.NET Development Server Not Working?

, 14 Jun 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
Is Your ASP.NET Development Server Not Working?
free hit counters

Since Visual Studio 2005, Visual Studio comes with a development web server: the ASP.NET Development Server.

I’ve been using this web server for simple test projects since then with Visual Studio 2005 and Visual Studio 2008 in Windows XP Professional on my work laptop and Windows XP Professional, Windows Vista 64bit Ultimate and Windows 7 64bit Ultimate at my home desktop without any problems (apart from the known custom identity problem, that is).

When I received my new work laptop, I installed Windows Vista 64bit Enterprise and Visual Studio 2008 and, to my surprise, the ASP.NET Development Server wasn’t working.

I started looking for differences between the laptop environment and the desktop environment and the most notorious differences were:

System Laptop Desktop

SKU

Windows Vista 64bit Enterprise

Windows Vista 64bit Ultimate

Joined to a Domain

Yes

No

Anti-Virus

McAffe

ESET

After asserting that no domain policies were being applied to my laptop and domain user and nothing was being logged by the anti-virus, my suspicions turned to the fact that the laptop was running an Enterprise SKU and the desktop was running an Ultimate SKU. After having problems with other applications, I was sure that the problem was the Enterprise SKU, but never found a solution to the problem. Because I wasn’t doing any web development at the time, I left it alone.

After upgrading to Windows 7, the problem persisted but, because I wasn’t doing any web development at the time, once again, I left it alone.

Now that I installed Visual Studio 2010, I had to solve this. After searching around forums and blogs that either didn’t offer an answer or offered very complicated workarounds that, sometimes, involved messing with the registry, I came to the conclusion that the solution is, in fact, very simple.

When Windows Vista is installed, hosts file, according to this contains this definition:

127.0.0.1       localhost
::1             localhost

This was not what I had on my laptop hosts file. What I had was this:

#127.0.0.1       localhost
#::1             localhost

I might have changed it myself, but from the number of people that I found complaining about this problem on Windows Vista, this was probably the way it was.

The installation of Windows 7 leaves the hosts file like this:

#127.0.0.1       localhost
#::1             localhost

And although the ASP.NET Development Server works fine on Windows 7 64bit Ultimate, on Windows 7 64bit Enterprise it needs to be changed to this:

127.0.0.1       localhost
::1             localhost

And I suspect it’s the same with Windows Vista 64bit Enterprise.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Paulo Morgado
Software Developer (Senior) Paulo Morgado
Portugal Portugal

Comments and Discussions

 
GeneralThanks. My problem solved using this article. Pinmembermhrs846-Jul-10 18:38 
GeneralRe: Thanks. My problem solved using this article. PinmemberPaulo Morgado6-Jul-10 21:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150123.1 | Last Updated 14 Jun 2010
Article Copyright 2010 by Paulo Morgado
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid