Click here to Skip to main content
15,867,330 members
Articles / Web Development / ASP.NET

Is Your ASP.NET Development Server Not Working?

Rate me:
Please Sign up or sign in to vote.
3.29/5 (3 votes)
14 Jun 2010CPOL2 min read 24K   3   2
Is Your ASP.NET Development Server Not Working?

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:

SystemLaptopDesktop
SKUWindows Vista 64bit EnterpriseWindows Vista 64bit Ultimate
Joined to a DomainYesNo
Anti-VirusMcAffeESET

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)


Written By
Software Developer (Senior) Paulo Morgado
Portugal Portugal

Comments and Discussions

 
GeneralThanks. My problem solved using this article. Pin
mhrs846-Jul-10 17:38
mhrs846-Jul-10 17:38 
GeneralRe: Thanks. My problem solved using this article. Pin
Paulo Morgado6-Jul-10 20:50
professionalPaulo Morgado6-Jul-10 20:50 

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

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